This closes #461

This commit is contained in:
Clebert Suconic 2016-04-13 21:29:59 -04:00
commit 5678d1ad2b
1 changed files with 7 additions and 3 deletions

View File

@ -95,7 +95,11 @@ start() {
return 1 return 1
fi fi
nohup ${ARTEMIS_INSTANCE}/bin/artemis run > /dev/null 2> /dev/null & if [ -z "$ARTEMIS_USER" -o `id -un` = "$ARTEMIS_USER" ] ; then
nohup ${ARTEMIS_INSTANCE}/bin/artemis run > /dev/null 2> /dev/null &
else
sudo -n -u ${ARTEMIS_USER} nohup ${ARTEMIS_INSTANCE}/bin/artemis run > /dev/null 2> /dev/null &
fi
echo $! > "${PID_FILE}" echo $! > "${PID_FILE}"