Issue #7405 has been updated by Matthaus Litteken.

Status changed from Accepted to In Topic Branch Pending Merge

Fix is in...mostly followed your idea Chris, but replaced 'su -c' with daemon 
instead, as init.d/functions are included.

Pull Request: https://github.com/puppetlabs/puppet-dashboard/pull/29

Commit: 
https://github.com/haus/puppet-dashboard/commit/0e81c2554df5fb4a9e54465a7c505ca5998ce628

Branch: ticket/7405

Repository: [email protected]:haus/puppet-dashboard
----------------------------------------
Bug #7405: Dashboard dies if init script used outside of boot
https://projects.puppetlabs.com/issues/7405

Author: Chris Phillips
Status: In Topic Branch Pending Merge
Priority: Normal
Assignee: Matthaus Litteken
Category: 
Target version: 1.x
Keywords: 
Branch: 
Affected URL: 
Affected Dashboard version: 1.1.0


Hi,

The /etc/init.d/puppet-dashboard script is written in such a way that 
restarting the service over ssh and logging out again causes the service to 
hang, as the process is merely &'d into the background via sudo, not 
daemonized. The script itslf admits this is hacky, but this seems to be 
significantly more than just hacky...

I think that the following is less bad. Not great. Just less bad...

<pre>
        DASHBOARD_CMD="${DASHBOARD_RUBY} ${DASHBOARD_HOME}/script/server -e 
${DASHBOARD_ENVIRONMENT} -p ${DASHBOARD_PORT} -b ${DASHBOARD_IFACE} -d"
        su -s /bin/sh -c "${DASHBOARD_CMD}" ${DASHBOARD_USER} 
        local PID=$(pgrep -f "${DASHBOARD_CMD}")
        echo $PID > ${PIDFILE}
</pre>

This also means that as the process is daemonized with the -d the verbose 
output is not constantly spewed into my terminal. When the service is correclty 
configured and all, it certainly makes it a viable option to restart over ssh, 
unlike the current one in the 2.6.7 rpm currently on yum.puppetlabs.com


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to