Archived
2
0
Fork 0
forked from blallo/Feedati
This repository has been archived on 2024-10-31. You can view files and clone it, but cannot push or open issues or pull requests.
Feedati/docker/ttrss-openrc-ttrssupdate
2018-08-16 11:36:18 +02:00

27 lines
638 B
Bash
Executable file

#!/sbin/openrc-run
name="ttrssupdate"
description="continously update tt-rss feeds"
command="/usr/bin/php7"
command_args="/app/public/tt-rss/update.php --daemon"
command_user="apache"
pidfile="/run/$name.pid"
command_background=true
start_stop_daemon_args=""
depend() {
need ntpd
}
start_pre() {
for _ in $(seq 1 60); do
if env PGPASSWORD=password-dev psql -h db -U ttrss -w ttrss -c "" -q; then
return 0
fi
einfo "Waiting..."
sleep 1
done
einfo "Timeout! postgresql wasn't ready in 60 seconds; aborting ${name} start ($description)"
return 1
}
# vim: set ft=sh bkc=yes: