Upgrade script checks for old master/slave dirs before rewriting state files
This commit is contained in:
parent
da5140d3f0
commit
bdc9e42046
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue