Skip to content

Commit

Permalink
Merge pull request Normation#124 from nperron/ust_3610/int/3935_add_s…
Browse files Browse the repository at this point in the history
…tatus_option_to_rudder_server_root

Fixes #3935 - Add 'status' option to rudder-server-root init.d script thanks to Dennis Cabooter
  • Loading branch information
jooooooon committed Sep 20, 2013
2 parents c616f29 + 0e515aa commit 1e81fec
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion rudder-server-root/SOURCES/rudder-server-root.init
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,33 @@ ${APACHE2_INIT} stop
/etc/init.d/slapd stop
}

status_services()
{
${APACHE2_INIT} status
/etc/init.d/jetty check | tail -1
/etc/init.d/rudder-agent status
# Add PostgreSQL PID to the output
echo -n "postgres[$(ps axf | grep postmaster | grep -v grep | cut -d" " -f 2)]: "
/etc/init.d/postgresql* status
/etc/init.d/slapd status
}

case "$1" in
stop)
stop_services
;;
start)
start_services
;;
status)
status_services
;;
restart)
stop_services
start_services
;;
*)
echo "Usage: $0 {start|stop|restart}"
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
Expand Down

0 comments on commit 1e81fec

Please sign in to comment.