fix: daemonization

This commit is contained in:
f 2023-11-23 18:39:10 -03:00
parent 53b1edf291
commit f6ba800908
No known key found for this signature in database

View file

@ -10,6 +10,8 @@ pid=/run/access_logd.pid
case $1 in
start)
test -f $pid && exit 0
# Copy default database
install -m 640 -o nobody /var/lib/access_log.sqlite3 /var/log/access_log.sqlite3
@ -17,7 +19,7 @@ case $1 in
rm -f /tmp/access_log.socket
# Read from fifo and load into database
daemonize -p /run/access_logd.pid -u nginx /usr/local/bin/syslogize /usr/bin/access_log $ACCESS_LOGS_FLAGS
daemonize -p $pid -u nginx /usr/local/bin/syslogize /usr/bin/access_log $ACCESS_LOGS_FLAGS
;;
stop)
test -f $pid || exit 0