From 4762f65dc1bc21529ceb223221094e76777a4562 Mon Sep 17 00:00:00 2001 From: Clint Byrum Date: Wed, 3 Apr 2013 11:28:53 -0700 Subject: [PATCH] Streamline upstart scripts in os-svc-daemon Best practice is to use start-stop-daemon rather than sudo, as sudo will apply user-centric pam limits and create a wtmp entry. Also there is no need for a script stanza, as we are only execing one command. Change-Id: I0c2f12536b56d90fd43ab40e74424350efcc0b61 --- elements/os-svc-install/bin/os-svc-daemon | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/elements/os-svc-install/bin/os-svc-daemon b/elements/os-svc-install/bin/os-svc-daemon index 11f737ae7..161423a0c 100755 --- a/elements/os-svc-install/bin/os-svc-daemon +++ b/elements/os-svc-install/bin/os-svc-daemon @@ -19,9 +19,7 @@ end script respawn -script - exec sudo -u $user /opt/stack/venvs/$user/bin/$cmd $args -end script +exec start-stop-daemon --start -c $user --exec /opt/stack/venvs/$user/bin/$cmd $args EOF }