fix: don't copy the database if it already exists
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
e166617164
commit
ae6d88c55e
1 changed files with 3 additions and 3 deletions
|
@ -12,10 +12,10 @@ case $1 in
|
|||
start)
|
||||
pgrep /usr/bin/access_log && exit 0
|
||||
|
||||
# Copy default database
|
||||
install -m 640 -o nobody /var/lib/access_log.sqlite3 /var/log/access_log.sqlite3
|
||||
# Copy default database if it doesn't exist
|
||||
test -f /var/log/access_log.sqlite3 || install -m 640 -o nobody /var/lib/access_log.sqlite3 /var/log/access_log.sqlite3
|
||||
|
||||
# Remove socket if previous run ended suddendly
|
||||
# Remove socket if previous run ended suddenly
|
||||
rm -f /tmp/access_log.socket
|
||||
|
||||
# Read from fifo and load into database
|
||||
|
|
Loading…
Reference in a new issue