mirror of
https://github.com/binary-kitchen/doorlockd
synced 2026-08-09 23:18:56 +02:00
Added proper daemonization
This commit is contained in:
parent
c392f79237
commit
164df6604c
6 changed files with 88 additions and 26 deletions
1
scripts/doorlockd
Normal file
1
scripts/doorlockd
Normal file
|
|
@ -0,0 +1 @@
|
|||
LDAPTLS_REQCERT=never
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/bash
|
||||
PIDFILE=/tmp/doorlockd-pid
|
||||
|
||||
gpio load spi
|
||||
gpio load i2c
|
||||
|
||||
/home/ralf/doorlockd-build/doorlockd &
|
||||
PID=$!
|
||||
|
||||
echo $PID > $PIDFILE
|
||||
|
||||
wait $PID
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
PIDFILE=/tmp/doorlockd-pid
|
||||
|
||||
if [ -f $PIDFILE ]
|
||||
then
|
||||
kill `cat $PIDFILE`
|
||||
rm $PIDFILE
|
||||
else
|
||||
echo "PID file not existent"
|
||||
fi
|
||||
|
||||
|
|
@ -5,8 +5,8 @@ After=network.target
|
|||
[Service]
|
||||
User=root
|
||||
Group=root
|
||||
ExecStart=/usr/local/share/doorlockd/doorlockd-start
|
||||
ExecStop=/usr/local/share/doorlockd/doorlockd-stop
|
||||
EnvironmentFile=-/etc/sysconfig/doorlockd
|
||||
ExecStart=/usr/local/sbin/doorlockd -f
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue