Remove legacy freedns update command

This commit is contained in:
Bob Mottram 2016-10-17 13:50:09 +01:00
parent 48cf548a67
commit d242b21900
2 changed files with 8 additions and 4 deletions

View File

@ -325,10 +325,8 @@ function remove_htmly {
rm -rf /var/www/$HTMLY_DOMAIN_NAME
fi
if [ $HTMLY_CODE ]; then
if [ -f /usr/bin/dynamicdns ]; then
sed -i "/$HTMLY_DOMAIN_NAME/d" /usr/bin/dynamicdns
sed -i "/$HTMLY_CODE/d" /usr/bin/dynamicdns
fi
sed -i '/HTMLY_DOMAIN_NAME.*/d' $CONFIGURATION_FILE
sed -i '/HTMLY_CODE.*/d' $CONFIGURATION_FILE
fi
function_check remove_onion_service
remove_onion_service htmly ${HTMLY_ONION_PORT}

View File

@ -108,6 +108,12 @@ function create_freedns_updater {
return
fi
# remove any legacy command
if [ -f /usr/bin/dynamicdns ]; then
rm /usr/bin/dynamicdns
fi
# add the update command to cron
if ! grep -q "/usr/local/bin/freedombone-freedns" /etc/crontab; then
function_check cron_add_mins
cron_add_mins 3 '/usr/local/bin/freedombone-freedns'