diff --git a/upgrade-v1.0x-v1.3x.sh b/upgrade-v1.0x-v1.3x.sh index fcad9ad..f1dc2a1 100755 --- a/upgrade-v1.0x-v1.3x.sh +++ b/upgrade-v1.0x-v1.3x.sh @@ -7,7 +7,7 @@ CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" OLD_PROGRAM_VERSION="v1.0x-v1.2x" NEW_PROGRAM_VERSION="v1.3x" CONFIG_FILE_REVISION=1.3.0 -PROGRAM_BUILD=2019070502 +PROGRAM_BUILD=2019090901 ## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode if ! type "$BASH" > /dev/null; then @@ -606,8 +606,12 @@ elif [ "$1" != "" ] && [ -f "$1" ] && [ -w "$1" ]; then RewriteOldConfigFiles "$CONF_FILE" AddMissingConfigOptionsAndFixBooleans "$CONF_FILE" UpdateConfigHeader "$CONF_FILE" - RenameStateFiles "$MASTER_SYNC_DIR" - RenameStateFiles "$SLAVE_SYNC_DIR" + if [ -d "$MASTER_SYNC_DIR" ]; then + RenameStateFiles "$MASTER_SYNC_DIR" + fi + if [ -d "$SLAVE_SYNC_DIR" ]; then + RenameStateFiles "$SLAVE_SYNC_DIR" + fi rm -f "$CONF_FILE.tmp" else Usage