mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-26 09:56:17 -05:00
Delaying map startup because it prevents the API from starting.
This commit is contained in:
parent
af8bd7ba34
commit
2ad363281f
17 changed files with 207 additions and 139 deletions
|
|
@ -17,8 +17,8 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
|||
DESC="Mapnik rendering daemon"
|
||||
NAME=renderd
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS="-c /etc/renderd.conf"
|
||||
PIDSOCKDIR=/var/run/$NAME
|
||||
DAEMON_ARGS=""
|
||||
PIDSOCKDIR=/run/$NAME
|
||||
PIDFILE=$PIDSOCKDIR/$NAME.pid
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
RUNASUSER=_renderd
|
||||
|
|
@ -42,6 +42,10 @@ RUNASUSER=_renderd
|
|||
do_start()
|
||||
{
|
||||
[ -d "$PIDSOCKDIR" ] || mkdir -p $PIDSOCKDIR && chown $RUNASUSER $PIDSOCKDIR
|
||||
|
||||
# Sleep because starting renderd prevents API from starting.
|
||||
sleep 60
|
||||
|
||||
# Return
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
|
|
@ -143,6 +147,9 @@ case "$1" in
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
status)
|
||||
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
||||
;;
|
||||
*)
|
||||
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue