Archived
2
0
Fork 0
forked from blallo/Feedati

ttrss: start ntpd first

This commit is contained in:
boyska 2018-08-16 11:36:18 +02:00
parent 896c6a49d8
commit 0c6feb350a
3 changed files with 27 additions and 2 deletions

View file

@ -1,5 +1,10 @@
#!/sbin/runscript
depend() {
need ntpd
}
start() {
ebegin "Starting Apache (with wrapper)"
start-stop-daemon --background --start --exec /bootstrap/start.sh \
@ -16,3 +21,4 @@ stop() {
--pidfile /var/run/apache2/httpd.pid
eend $?
}
# vim: set ft=sh bkc=yes:

12
docker/ttrss-openrc-ntpd Executable file
View file

@ -0,0 +1,12 @@
#!/sbin/openrc-run
name="ntpd"
description="update clock"
command="/usr/sbin/ntpd"
command_user="root"
pidfile="/run/$name.pid"
command_args="-s -p $pidfile"
start_stop_daemon_args=""
# vim: set ft=sh bkc=yes:

View file

@ -6,15 +6,22 @@ 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; then
if env PGPASSWORD=password-dev psql -h db -U ttrss -w ttrss -c "" -q; then
return 0
fi
einfo "Waiting... ( $? )"
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: