#!/bin/bash if ! crontab -l | grep smokeping; then crontab -l > /tmp/$$.cron || exit 1 echo '*/5 * * * * nice smokeping --config=/home/system/smokeping/smokeping.conf --static &>/dev/null' >> /tmp/$$.cron || exit 1 cat /tmp/$$.cron | crontab - || exit 1 rm /tmp/$$.cron fi