1 2 3 4 5 6 7 8 9 10 11 12 13 14
CRON_TASK="* * * * * /usr/bin/usage-logging/another-minute.sh" post_install () { echo "Adding cron task..." crontab -l | { cat; echo "$CRON_TASK"; } | crontab - } pre_remove () { echo "Removing cron task..." crontab -l | grep -Fxv "$CRON_TASK" | crontab - }