Pattern below allows for a bash script to be called via, say, cron and check to see if it is already running.
Useful for things like rsync tasks.
PIDFILE=/var/run/myscriptname.pid
if [ -f $PIDFILE ]
then
PID=$(cat $PIDFILE)Pattern below allows for a bash script to be called via, say, cron and check to see if it is already running.
Useful for things like rsync tasks.
PIDFILE=/var/run/myscriptname.pid
if [ -f $PIDFILE ]
then
PID=$(cat $PIDFILE)| <?php | |
| /** | |
| * This is free and unencumbered software released into the public domain. | |
| * | |
| * Anyone is free to copy, modify, publish, use, compile, sell, or | |
| * distribute this software, either in source code form or as a compiled | |
| * binary, for any purpose, commercial or non-commercial, and by any | |
| * means. | |
| * |