Cannot Autoboot Domoticz with SystemV Init
Posted: Friday 05 June 2020 14:41
I have setup these setup instructions that in the past worked fine, but now it does not seem to autoboot Domoticz on SystemV on a Raspberry PI 3+ with Raspbian. Is there something I am missing?
apt-get install –y libcurl4-gnutls-dev sqlite3 libsqlite3-dev
mkdir /usr/local/src/domoticz
cd /usr/local/src/domoticz
chown –R pi:pi /usr/local/src/domoticz
chmod a+rwx /usr/local/src/domoticz
wget https://releases.domoticz.com/releases/ ... armv7l.tgz
tar -zxvf domoticz_linux_armv7l.tgz
export PATH=$PATH:/usr/local/src/domoticz
file domoticz
/usr/local/src/domoticz/domoticz -h
/usr/local/src/domoticz/domoticz
Open a web browser at the same LAN, and enter the following URL.
http://192.168.1.1:8080
Stop Domoticz with the <[CTL]-Z> key combination.
Create the log file, change the ownership and directory rights.
touch /var/log/domoticz.log
chown pi:pi /var/log/domoticz.log
chmod a+rwx /var/log/domoticz.log
cp /usr/local/src/domoticz/domoticz.sh /etc/init.d/domoticz
nano /etc/init.d/domoticz
Adjust the file as per below.
...
DESC="Domoticz Smart Home Automation"
NAME=domoticz
USERNAME=pi
PIDFILE=/var/run/$NAME.pid
LOGFILE=/var/log/$NAME.log
SCRIPTFILE=/etc/init.d/$NAME
...
DAEMON=/usr/local/src/$NAME/$NAME
DAEMON_ARGS="-daemon"
DAEMON_ARGS="$DAEMON_ARGS –daemonname $NAME pidfile $PIDFILE"
DAEMON_ARGS="$DAEMON_ARGS -www 8080"
DAEMON_ARGS="$DAEMON_ARGS -sslwww 0"
DAEMON_ARGS="$DAEMON_ARGS –nowwwpwd"
DAEMON_ARGS="$DAEMON_ARGS -loglevel=normal"
DAEMON_ARGS="$DAEMON_ARGS -log $LOGFILE"
DAEMON_ARGS="$DAEMON_ARGS -syslog"
...
start-stop-daemon –-chuid $USERNAME –-start –-quiet –-pidfile $PIDFILE –-exec \
$DAEMON –-test > /dev/null || return 1
start-stop-daemon –-chuid $USERNAME –-start –-quiet –-pidfile $PIDFILE –-exec \
$DAEMON –- $DAEMON_ARGS || return 2
...
Save and close the file with the <[CTL]-X,Y,[ENT]> key combination.
Set file ownership and rights, update the system-V init script and start the domoticz service.
chown –R pi:pi /etc/init.d/domoticz
chmod a+rwx /etc/init.d/domoticz
systemctl daemon-reload
update-rc.d domoticz defaults
/etc/init.d/domoticz start
/etc/init.d/domoticz status
service domoticz start
service domoticz restart
service domoticz status –l
ps –aux | grep domoticz
netstat –tulpen | grep 8080
Open a web browser at the same LAN, and enter the following URL.
http://192.168.1.1:8080
apt-get install –y libcurl4-gnutls-dev sqlite3 libsqlite3-dev
mkdir /usr/local/src/domoticz
cd /usr/local/src/domoticz
chown –R pi:pi /usr/local/src/domoticz
chmod a+rwx /usr/local/src/domoticz
wget https://releases.domoticz.com/releases/ ... armv7l.tgz
tar -zxvf domoticz_linux_armv7l.tgz
export PATH=$PATH:/usr/local/src/domoticz
file domoticz
/usr/local/src/domoticz/domoticz -h
/usr/local/src/domoticz/domoticz
Open a web browser at the same LAN, and enter the following URL.
http://192.168.1.1:8080
Stop Domoticz with the <[CTL]-Z> key combination.
Create the log file, change the ownership and directory rights.
touch /var/log/domoticz.log
chown pi:pi /var/log/domoticz.log
chmod a+rwx /var/log/domoticz.log
cp /usr/local/src/domoticz/domoticz.sh /etc/init.d/domoticz
nano /etc/init.d/domoticz
Adjust the file as per below.
...
DESC="Domoticz Smart Home Automation"
NAME=domoticz
USERNAME=pi
PIDFILE=/var/run/$NAME.pid
LOGFILE=/var/log/$NAME.log
SCRIPTFILE=/etc/init.d/$NAME
...
DAEMON=/usr/local/src/$NAME/$NAME
DAEMON_ARGS="-daemon"
DAEMON_ARGS="$DAEMON_ARGS –daemonname $NAME pidfile $PIDFILE"
DAEMON_ARGS="$DAEMON_ARGS -www 8080"
DAEMON_ARGS="$DAEMON_ARGS -sslwww 0"
DAEMON_ARGS="$DAEMON_ARGS –nowwwpwd"
DAEMON_ARGS="$DAEMON_ARGS -loglevel=normal"
DAEMON_ARGS="$DAEMON_ARGS -log $LOGFILE"
DAEMON_ARGS="$DAEMON_ARGS -syslog"
...
start-stop-daemon –-chuid $USERNAME –-start –-quiet –-pidfile $PIDFILE –-exec \
$DAEMON –-test > /dev/null || return 1
start-stop-daemon –-chuid $USERNAME –-start –-quiet –-pidfile $PIDFILE –-exec \
$DAEMON –- $DAEMON_ARGS || return 2
...
Save and close the file with the <[CTL]-X,Y,[ENT]> key combination.
Set file ownership and rights, update the system-V init script and start the domoticz service.
chown –R pi:pi /etc/init.d/domoticz
chmod a+rwx /etc/init.d/domoticz
systemctl daemon-reload
update-rc.d domoticz defaults
/etc/init.d/domoticz start
/etc/init.d/domoticz status
service domoticz start
service domoticz restart
service domoticz status –l
ps –aux | grep domoticz
netstat –tulpen | grep 8080
Open a web browser at the same LAN, and enter the following URL.
http://192.168.1.1:8080