diff options
Diffstat (limited to 'share/hydractl/backup-restore-site')
-rwxr-xr-x | share/hydractl/backup-restore-site | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/share/hydractl/backup-restore-site b/share/hydractl/backup-restore-site index 9a25738..bf48994 100755 --- a/share/hydractl/backup-restore-site +++ b/share/hydractl/backup-restore-site @@ -21,7 +21,7 @@ source $APP_BASE/lib/hydra/functions || exit 1 hydra_config_load # Basic parameters. -SITE="$3" +SITE="$2" SITES="/var/sites" FOLDER="$SITES/$SITE" WWW="/var/www/data" @@ -34,7 +34,14 @@ fi # Check restore strategy. if [ "$1" == "backups" ]; then - hydra_backup_environment_local_website $2 $3 + SITE="$3" + + if [ -z "$SITE" ]; then + hydra_action_usage + exit 1 + fi + + hydra_backup_environment_local_website $2 $SITE elif [ "$1" == "localhost" ] || [ "$1" == "`facter hostname`" ]; then hydra_backup_environment_local else |