Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xraystyle/10181204 to your computer and use it in GitHub Desktop.
Save xraystyle/10181204 to your computer and use it in GitHub Desktop.
#!/bin/bash
#############################################################
# Init script for CrashplanEngine
#
# Code42 Software Inc, Minneapolis, MN
# http://www.code42.com/
#
# Copyright (c) 2009 Code42 Software, All Rights Reserved
#############################################################
### BEGIN INIT INFO
# Provides: proserver
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: proserver init script
# Description: This script starts, stops and returns
# status of CrashplanPRO Server.
### END INIT INFO
case "$1" in
start)
/opt/proserver/bin/proserver start
;;
stop)
/opt/proserver/bin/proserver stop
;;
restart)
/opt/proserver/bin/proserver stop
/opt/proserver/bin/proserver start
;;
status)
if [ -f /opt/proserver/proserver.pid ] ; then
PID=`cat /opt/proserver/proserver.pid`
PS_OUT=`ps aux | egrep "^root\s+$PID"`
if [ $? -eq "0" ] ; then
echo "CrashplanPRO Server is running."
else
echo "CrashplanPRO Server is stopped."
exit 1
fi
else
echo "CrashplanPRO Server is stopped."
exit 1
fi
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment