Exemple #1
0
def rollback(vhost_path):
    """ Updates symlinks: Remove current instance and rename previous to current """

    with cd(vhost_path):
        if exists('./previous_instance'):
            commands.delete('./current_instance')
            commands.rename('./previous_instance', './current_instance')
Exemple #2
0
def set_current_instance(vhost_path, instance_path):
    """ Delete previous, set current to previous and new to current """

    with cd(vhost_path):
        commands.delete('./previous_instance')

        if exists('./current_instance'):
            commands.rename('./current_instance', './previous_instance')

        commands.create_symbolic_link(instance_path, './current_instance')