Advertisement
Algabe

zncchk

Jul 26th, 2014
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.42 KB | None | 0 0
  1. #!/bin/sh
  2. # This is the crontab script for znc.
  3. #
  4. # Crontab add: */2 * * * * /home/algabe/znc-1.4/zncchk >/dev/null 2>&1
  5. #
  6. # Please change the following path to your znc-directory.
  7.  
  8. ZNCPATH=/usr/local/bin/
  9.  
  10. # the rest should be kept as is
  11.  
  12. if test -r $ZNCPATH/znc.pid; then
  13.     ZNCPID=$(cat $ZNCPATH/znc.pid)
  14.     if $(kill -CHLD $ZNCPID >/dev/null 2>&1)
  15.     then
  16.     exit 0
  17.     fi
  18. fi
  19. cd $ZNCPATH
  20. ./znc &>/dev/null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement