Daemonize ddclient

This commit is contained in:
Patrick McDonagh
2016-02-24 15:13:39 -06:00
parent a81bfa2e44
commit ab9da50b90

View File

@@ -27,7 +27,8 @@ if [ "$run_start" = "y" ]; then
echo "Enter the company identifier:"
read company_ident
echo "protocol=dyndns2" > ddclient.conf
echo "daemon=3600" > ddclient.conf
echo "protocol=dyndns2" >> ddclient.conf
echo "use=web" >> ddclient.conf
echo "server=domains.google.com" >> ddclient.conf
echo "ssl=yes" >> ddclient.conf
@@ -35,8 +36,13 @@ if [ "$run_start" = "y" ]; then
echo "password=$password" >> ddclient.conf
echo "$well_name.$company_ident.poconsole.net" >> ddclient.conf
echo "Good work, class! Let's apply the settings!"
mv ddclient.conf /etc/
ddclient > ddclient.log
sed -i 's/run_daemon="false"/run_daemon="true"/g' /etc/default/ddclient
sed -i 's/daemon_interval="300"/daemon_interval="3600"/g' /etc/default/ddclient
/etc/init.d/ddclient start
/etc/init.d/ddclient status > ddclient.log
cat ddclient.log
else
echo "Your loss... I was going to do some cool stuff..."