mirror of
https://github.com/binary-kitchen/doorlockd
synced 2026-02-13 06:19:03 +01:00
Added proper daemonization
This commit is contained in:
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
|
||||
|
||||
Reference in New Issue
Block a user