Skip to content

Instantly share code, notes, and snippets.

@wilxsv
Last active July 9, 2017 19:03
Show Gist options
  • Save wilxsv/ebab614278dec634f9cb97dc6c496687 to your computer and use it in GitHub Desktop.
Save wilxsv/ebab614278dec634f9cb97dc6c496687 to your computer and use it in GitHub Desktop.
#!/bin/sh
### BEGIN INIT INFO
# Provides: micrositioserver
# Required-Start: $local_fs $remote_fs $network $time $syslog
# Required-Stop: $local_fs $remote_fs $network $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start MicroSitioServer at boot time
# Description: Enable service provided by MicroSitioServer.
### END INIT INFO
PENTAHO_HOME="/opt/pentaho-server/"
case "$1" in
start)
if [ -f $PENTAHO_HOME/start-pentaho.sh ]; then
echo "Starting MicroSitioServer"
$PENTAHO_HOME/start-pentaho.sh
fi
;;
stop)
if [ -f $PENTAHO_HOME/stop-pentaho.sh ]; then
echo "Stopping MicroSitioServer"
$PENTAHO_HOME/stop-pentaho.sh
fi
;;
restart)
echo "Restarting MicroSitioServer"
$PENTAHO_HOME/stop-pentaho.sh
$PENTAHO_HOME/start-pentaho.sh
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment