#
# thomas@linuxmuster.net
# 18.12.2013
# GPL v3
#

echo "### 99_start-services prepatch"

if [ "$1" != "--first" ]; then
 if [ "$serverip" != "$serverip_old" ]; then
  # adjust serverip if changed
  backup_file /etc/openntpd/ntpd.conf
  sed -e "s/^listen on.*/listen on $serverip/" -i /etc/openntpd/ntpd.conf
 fi
 # patch ntpd.conf only on first install
 mv ntpd.conf.target ntpd.conf.target.nopatch
fi
