Delaying map startup because it prevents the API from starting.

This commit is contained in:
Roland 2024-07-30 17:14:08 -06:00
parent af8bd7ba34
commit 2ad363281f
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
17 changed files with 207 additions and 139 deletions

View file

@ -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