Navigation Menu

Skip to content

Commit

Permalink
deb: fix not to control user/group by init script
Browse files Browse the repository at this point in the history
TODO: customize user/group settings by groonga-httpd.conf
  • Loading branch information
kenhys committed Aug 2, 2012
1 parent 6c59bfc commit 223b6b8
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions packages/debian/groonga-httpd.init
Expand Up @@ -39,27 +39,16 @@ DEFAULT_FILE=/etc/default/groonga-httpd

[ "$ENABLE" = "yes" ] || exit 0

USER_EXIST=0
if [ -n "${USER}" ]; then
if ! getent passwd | grep -q "^${USER}:"; then
echo "$0: user for running groonga-httpd doesn't exist: ${USER}" >&2
exit 1
else
USER_EXIST=1
fi
fi
GROUP_EXIST=0
if [ -n "${GROUP}" ]; then
if ! getent group | grep -q "^${GROUP}:"; then
echo "$0: group for running groonga-httpd doesn't exist: ${GROUP}" >&2
exit 1
else
GROUP_EXIST=1
fi
fi
if [ $USER_EXIST = 1 ]; then
if [ $GROUP_EXIST = 1 ]; then
START_STOP_DAEMON_ARGS="${START_STOP_DAEMON_ARGS} --chuid ${USER}:${GROUP}"
fi
fi
DAEMON_ARGS="${DAEMON_ARGS} ${OPTION_ARGS}"
Expand Down

0 comments on commit 223b6b8

Please sign in to comment.