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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...