Allow launch script to be used by accounts that use /sbin/nologin

Closes gh-3852
Closes gh-3906
This commit is contained in:
Thomas Raehalme 2015-08-31 15:23:39 +03:00 committed by Andy Wilkinson
parent 5c35d89fd1
commit 3865f3b303

View File

@ -124,7 +124,7 @@ start() {
chown "$run_user" "$PID_FOLDER"
chown "$run_user" "$pid_file"
chown "$run_user" "$log_file"
su -c "$command &> \"$log_file\" & echo \$!" $run_user > "$pid_file"
su -s /bin/sh -c "$command &> \"$log_file\" & echo \$!" $run_user > "$pid_file"
pid=$(cat "$pid_file")
else
checkPermissions || return $?