Skip to content

Instantly share code, notes, and snippets.

@agrohe21
Last active June 20, 2017 19:29
Show Gist options
  • Save agrohe21/4da1f5ede8b70f310b92523068a0f7ab to your computer and use it in GitHub Desktop.
Save agrohe21/4da1f5ede8b70f310b92523068a0f7ab to your computer and use it in GitHub Desktop.
Start system monitoring on boot
#!/bin/sh
### BEGIN INIT INFO
# Provides: pentaho-mon-sys
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Pentaho Monitor System
### END INIT INFO
case "$1" in
"start")
su pentaho -lc "/home/pentaho/projects/ps-shared/kettle/monitor/di/env/svr_sys/mon_sys_local.sh > /home/pentaho/mon_sys_boot.log 2>&1 &"
;;
"stop")
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0
update-rc.d pentaho-mon-sys defaults
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment