Created
April 8, 2014 19:55
-
-
Save xraystyle/10181204 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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