[packaging] Add check if old install folder exists
This commit is contained in:
@@ -15,7 +15,8 @@ fi
|
||||
OLD_INSTALLATION_DIR="/opt/safing/portmaster"
|
||||
MIGRATED_FILE_FLAG="$OLD_INSTALLATION_DIR/migrated.txt"
|
||||
|
||||
if [ ! -e "$MIGRATED_FILE_FLAG" ]; then
|
||||
if [ -d "$OLD_INSTALLATION_DIR" ]; then
|
||||
if [ ! -e "$MIGRATED_FILE_FLAG" ]; then
|
||||
echo "Starting migration form v1"
|
||||
|
||||
# Becoause the service file need to change path, first the links to the old service needs to be removed.
|
||||
@@ -32,6 +33,7 @@ if [ ! -e "$MIGRATED_FILE_FLAG" ]; then
|
||||
|
||||
touch $MIGRATED_FILE_FLAG
|
||||
echo "Migration complete"
|
||||
fi
|
||||
fi
|
||||
|
||||
mv /usr/bin/portmaster /usr/lib/portmaster/portmaster
|
||||
|
||||
Reference in New Issue
Block a user