mirror of
https://github.com/openstreetmap/mod_tile.git
synced 2025-07-25 15:04:30 +00:00
Debian package : easier way to change user renderd is run with
This is a patch provided by sletuffe on github: https://github.com/openstreetmap/mod_tile/pull/1
This commit is contained in:
7
debian/renderd.init
vendored
7
debian/renderd.init
vendored
@ -19,6 +19,7 @@ DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
PIDFILE=/var/run/$NAME/$NAME.pid
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
RUNASUSER=www-data
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
@ -39,14 +40,14 @@ SCRIPTNAME=/etc/init.d/$NAME
|
||||
do_start()
|
||||
{
|
||||
mkdir -p /var/run/renderd
|
||||
chown www-data:www-data /var/run/renderd
|
||||
chown $RUNASUSER /var/run/renderd
|
||||
# Return
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
# 2 if daemon could not be started
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid www-data --exec $DAEMON --test > /dev/null \
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $RUNASUSER --exec $DAEMON --test > /dev/null \
|
||||
|| return 1
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid www-data --exec $DAEMON -- \
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $RUNASUSER --exec $DAEMON -- \
|
||||
$DAEMON_ARGS \
|
||||
|| return 2
|
||||
# Add code here, if necessary, that waits for the process to be ready
|
||||
|
2
debian/renderd.postinst
vendored
2
debian/renderd.postinst
vendored
@ -3,8 +3,6 @@ set -e
|
||||
|
||||
mkdir -p /var/lib/mod_tile
|
||||
chown www-data:www-data /var/lib/mod_tile
|
||||
chown www-data:www-data /usr/bin/renderd
|
||||
chmod u+s /usr/bin/renderd
|
||||
|
||||
# automatically install munin plugins if munin is present.
|
||||
if [ -d /etc/munin/plugins ]
|
||||
|
Reference in New Issue
Block a user