Very Generic Linux Service Watchdog script Rumi, June 16, 2016 A strong watchdog script- indeed! #!/bin/bash # # watchdog # # Run as a cron job to keep an eye on what_to_monitor which should always # be running. Restart what_to_monitor and send notification as needed. # # This needs to be run as root or a user that can start system services. # # Revisions: 0.1 (20100506), 0.2 (20100507) NAME=what_to_monitor START=/full/path/to/$NAME NOTIFY=person1email NOTIFYCC=person2email GREP=/bin/grep PS=/bin/ps NOP=/bin/true DATE=/bin/date MAIL=/bin/mail RM=/bin/rm $PS -ef|$GREP -v grep|$GREP $NAME >/dev/null 2>&1 case "$?" in 0) # It is running in this case so we do nothing. $NOP ;; 1) echo "$NAME is NOT RUNNING. Starting $NAME and sending notices." $START 2>&1 >/dev/null & NOTICE=/tmp/watchdog.txt echo "$NAME was not running and was started on `$DATE`" > $NOTICE $MAIL -n -s "watchdog notice" -c $NOTIFYCC $NOTIFY < $NOTICE $RM -f $NOTICE ;; esac exit Src: http://blog.eracc.com/2010/05/08/linux-monitor-a-service-with-a-watchdog-script/ Related Scripts Watchdog
Tweaking Afterlogic Webmail Pro 6 November 6, 2011 Removed the default footer texts and added up usermin module like this 😉 in inc.footer.php file- <!– Powered by <a href="http://www.afterlogic.com/products/webmail-pro" target="_blank"> AfterLogic WebMail Pro</a><br /> Copyright © 2002-2010 <a href="http://www.afterlogic.com" target="_blank">AfterLogic Corporation</a> –> <?php $domain= $_SERVER['SERVER_NAME']; echo ":: CLICK BELOW LINK TO :: <BR /> <a href= https://$domain:20000>Change Password… Read More
Ozeki PHP Plugin June 6, 2014 <?php $gatewayURL = 'http://192.168.1.100:9333/ozeki?'; $request = 'login=sendmail'; $request .= '&password=mypassword'; $request .= '&action=sendMessage'; $request .= '&messageType=SMS:TEXT'; $request .= '&recepient='.urlencode('01711673093'); $request .= '&messageData='.urlencode("PHP Hello World"); $url = $gatewayURL . $request; //Open the URL to send the message file($url); ?> Related Read More
Javascript POP Up Window August 2, 2009 To open a new window by clicking on the link, you will need to use window.open method of javascript. Simple popup window <a href=”javascript: void(0)” onclick=”window.open(‘popup.html’, ‘windowname1’, ‘width=200, height=77’); return false;”>Click here for simple popup window</a> Now you can open a simple window, also this function can have different features… Read More