diff --git a/src/freedombone-utils-upgrade b/src/freedombone-utils-upgrade index 0475ac6a..4a1416ad 100755 --- a/src/freedombone-utils-upgrade +++ b/src/freedombone-utils-upgrade @@ -33,13 +33,13 @@ UPGRADE_SCRIPT_NAME="${PROJECT_NAME}-upgrade" function create_upgrade_script { if [ -f /usr/local/bin/${PROJECT_NAME}-upgrade ]; then - cp /usr/local/bin/${PROJECT_NAME}-upgrade /etc/cron.weekly/$UPGRADE_SCRIPT_NAME + cp /usr/local/bin/${PROJECT_NAME}-upgrade /etc/cron.weekly/$UPGRADE_SCRIPT_NAME else - cp /usr/bin/${PROJECT_NAME}-upgrade /etc/cron.weekly/$UPGRADE_SCRIPT_NAME + cp /usr/bin/${PROJECT_NAME}-upgrade /etc/cron.weekly/$UPGRADE_SCRIPT_NAME fi if grep -Fxq "create_upgrade_script" $COMPLETION_FILE; then - return + return fi apt-get -y install unattended-upgrades @@ -49,10 +49,10 @@ function create_upgrade_script { function upgrade_installation { if [ ! -f $COMPLETION_FILE ]; then - return + return fi if grep -Fxq "upgrade_installation" $COMPLETION_FILE; then - return + return fi # upgrade from previous versions to stockholm @@ -66,6 +66,10 @@ function upgrade_installation { sed -i 's|install_tox_node|install_tox|g' $COMPLETION_FILE sed -i 's|intrusion_detection|install_tripwire|g' $COMPLETION_FILE + if [ -f /usr/local/bin/zeronetavahi ]; then + rm /usr/local/bin/zeronetavahi + fi + echo 'upgrade_installation' >> $COMPLETION_FILE }