Changed sudo by su -c
Created by: nmoura
The sudo command needs a tty to run. If you put this file on a CentOS 6, for example, it will not run in the host startup process. Instead, the 'su -c' runs the command apart if it has or not a tty.
I tested this change in a fresh install of gitlab on a CentOS 6.5 with successful.
Created by: nmoura
Tested on Ubuntu Server 12.04.3 LTS with success:
/etc/rc.local contents: (...) app_user=nmoura if [ "$USER" != "$app_user" ]; then eval su - "$app_user" -c $(echo ")$0 "$0"$(echo "); exit; fi
touch /tmp/success exit 0
ls -l /tmp/success after reboot: -rw-rw-r-- 1 nmoura nmoura 0 Dec 27 17:49 /tmp/success
By Administrator on 2013-12-27T19:50:13 (imported from GitLab project)
Please register or sign in to reply