Closed cjkrolak closed 11 months ago
created /etc/init.d/rc2.d folder and added the following code as a script called "functions" within that folder.
#######################################################
#! /bin/sh
# . /etc/rc.d/init.d/functions # uncomment/modify for your killproc
case "$1" in
start)
echo "Starting noip2."
/usr/local/bin/noip2
;;
stop)
echo -n "Shutting down noip2."
killproc -TERM /usr/local/bin/noip2
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
#######################################################
Need to reboot server to determine if script is running on startup
auto re-start did not work
check status: sudo /usr/local/bin/noip2 -S start service manually: sudo /usr/local/bin/noip2
pi-specific instructions for install here: https://www.noip.com/support/knowledgebase/install-ip-duc-onto-raspberry-pi/
I tried moving script from /etc/init.d/rc2.d/functions to /etc/init.d/rc2.d, but still did not work on reboot.
updated startup script to start noip service.
[Desktop Entry]
Encoding=UTF-8
Name=SHT31 server autostart
Comment=Start a terminal, start DNS service, pull latest dev branch, and launch sht31 server
Exec=/usr/bin/lxterm -hold -e 'cd /home/pi/github/ThermostatSupervisor && sudo /usr/local/bin/noip2 && sudo noip2 -S && git checkout develop && git pull && pip install -r requirements.txt -r requirements_sht31.txt && python -m thermostatsupervisor.sht31_flask_server'
Terminal=true
X-KeepTerminal=true
noip ddns not updating, client probably not starting on boot