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:
Kai Krueger
2013-03-28 13:53:44 +00:00
parent b008759183
commit f427add3fa
2 changed files with 4 additions and 5 deletions

7
debian/renderd.init vendored
View File

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

View File

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