View Single Post
Posts: 1,320 | Thanked: 915 times | Joined on Feb 2010
#2
Newer Version of the script

Code:
#!/bin/sh

#set -x

#
# Variables Section
#==============================================================
# list process to monitor in the variable below.
#{wazapp} /usr/bin/python /opt/waxmppplugin/bin/wazapp/

PROGRAM1="wazapp"

#lists pid of that process

PID1=$(pidof $PROGRAM1)

#
#
#==================================================================

# The ‘if’ statement below checks to see if the process is running
# with the ‘ps’ command.  If the value is returned as a ’0' then
# an email will be sent and the process will be safely restarted.
#


if [ $PID1 = '' ];

then

/opt/waxmppplugin/bin/wazapp/wazapp

else

echo 'Wazapp is running'

fi

exit
__________________
Well Nokia do at least know how to build a decent phone, just apparently don't know how to support it..

N900 Died Replaced with N8, Requested E7, "Accidentally Broke E7", Now rolling with an N9 and im loving it!


My Contributions

N900 Conversations Wiki Page