Jump to content
Mumble forums

I search an AutoRestart script when my server goes Down / De


xlkiller
 Share

Recommended Posts

I found this: http://bash.cyberciti.biz/web-server/restart-apache2-httpd-shell-script/ but doesnt work with:

 

#!/bin/bash
# Mumble Process Monitor
# Restart Mumble Server When It Goes Down
# ------------------------------------------------------------------------- 
# uncomment if you are using Debian / Ubuntu Linux
RESTART="/etc/init.d/mumble-server start"

#path to pgrep command
PGREP="/usr/bin/pgrep"

# Httpd daemon name,
# Under RHEL/CentOS/Fedora it is httpd
# Under Debian 4.x it is apache2
MURMURD="murmurd"

# find httpd pid
$PGREP ${MURMURD}

if [ $? -ne 0 ] # if mumble not running
then
# restart mumble
$RESTART
fi

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...