Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- SERVICE='inadyn'
- if ps ax | grep -v grep | grep $SERVICE > /dev/null
- then
- echo "$SERVICE is running, everything is fine"
- else
- echo "$SERVICE is not running"
- # Inadyn DDNS fix
- sleep 20
- if [ -e /tmp/ddns/inadyn.conf ]; then
- cd /tmp/ddns && mv inadyn.conf inadyn.backup
- sed 's/ --cache_dir \/tmp\/ddns//' inadyn.backup | tee -i inadyn.conf
- /opt/bin/inadyn --input_file /tmp/ddns/inadyn.conf
- fi
- echo "$SERVICE is now started"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement