Commit 306d4ee728e68e1cbc3e63b56ff2d7912bb5605f
Exists in
spb-stable
and in
3 other branches
Merge pull request #5935 from nmoura/patch-1
Changed sudo by su -c in init script
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/support/init.d/gitlab
@@ -40,7 +40,7 @@ test -f /etc/default/gitlab && . /etc/default/gitlab | @@ -40,7 +40,7 @@ test -f /etc/default/gitlab && . /etc/default/gitlab | ||
40 | 40 | ||
41 | # Switch to the app_user if it is not he/she who is running the script. | 41 | # Switch to the app_user if it is not he/she who is running the script. |
42 | if [ "$USER" != "$app_user" ]; then | 42 | if [ "$USER" != "$app_user" ]; then |
43 | - sudo -u "$app_user" -H -i $0 "$@"; exit; | 43 | + eval su - "$app_user" -c $(echo \")$0 "$@"$(echo \"); exit; |
44 | fi | 44 | fi |
45 | 45 | ||
46 | # Switch to the gitlab path, exit on failure. | 46 | # Switch to the gitlab path, exit on failure. |