Skip to content
Snippets Groups Projects
Unverified Commit 8a03a3d9 authored by Bob Mottram's avatar Bob Mottram
Browse files

Remove old file on upgrade

parent 116d6330
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment