I’ve created a service to be started on node boot. I’m using CentOs 6.7 and if I start my service manually via service start it starts fine.
However when running via Chef the service is not started but I see the command to start it was run as there are some echo messages that I can see on Chef logs.
My start script has to change the user and to daemonize itself. This is the script I’m using but I’ve also tried su and sudo.
ulimit -n 65535
[ -x startExec ] || exit 5 echo -n "Starting $prog: . Command $startExec. User: <%=node[:wls][:user][:name]%>"
daemon --user <%=node[:wls][:user][:name]%> "startExec" retval=?
echo -n $"RETVAL = $retval"