|
|
@ -34,8 +34,6 @@
|
|
|
|
# It will also prune the number of backup files according to a value specified
|
|
|
|
# It will also prune the number of backup files according to a value specified
|
|
|
|
# by you in the configuration below.
|
|
|
|
# by you in the configuration below.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# When done, it will restart YSFGateway to make the Hosts changes take effect.
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# To install in root's crontab use the command ...
|
|
|
|
# To install in root's crontab use the command ...
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# sudo crontab -e
|
|
|
|
# sudo crontab -e
|
|
|
@ -56,10 +54,6 @@ YSFHOSTS=/path/to/YSFHosts.txt
|
|
|
|
# How many YSFHosts files do you want backed up (0 = do not keep backups)
|
|
|
|
# How many YSFHosts files do you want backed up (0 = do not keep backups)
|
|
|
|
YSFHOSTSFILEBACKUP=1
|
|
|
|
YSFHOSTSFILEBACKUP=1
|
|
|
|
|
|
|
|
|
|
|
|
# Command line to restart YSFGatway
|
|
|
|
|
|
|
|
YSFRESTARTCOMMAND="systemctl restart ysfgateway.service"
|
|
|
|
|
|
|
|
# YSFRESTARTCOMMAND="killall YSFGateway ; /path/to/YSFGateway/executable/YSFGateway /path/toYSFGateway/ini/file/YSFGateway.ini"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Do not edit below here
|
|
|
|
# Do not edit below here
|
|
|
@ -87,14 +81,11 @@ if [ ${BACKUPCOUNT} -gt ${YSFHOSTSFILEBACKUP} ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
for f in $(ls -tr ${YSFHOSTS}.* | head -${BACKUPSTODELETE})
|
|
|
|
for f in $(ls -tr ${YSFHOSTS}.* | head -${BACKUPSTODELETE})
|
|
|
|
do
|
|
|
|
do
|
|
|
|
rm $f
|
|
|
|
rm -f $f
|
|
|
|
done
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Generate YSFHosts.txt file
|
|
|
|
# Generate YSFHosts.txt file
|
|
|
|
curl https://register.ysfreflector.de/export.php > ${YSFHOSTS}
|
|
|
|
curl https://register.ysfreflector.de/export_csv.php > ${YSFHOSTS}
|
|
|
|
|
|
|
|
|
|
|
|
# Restart YSFgateway
|
|
|
|
|
|
|
|
eval ${YSFRESTARTCOMMAND}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
exit 0
|
|
|
|