The script if run from crontab returns an email :
/bin/sh: 1: service: not found
This is the script:
#!/bin/bash
wajig restart exim4
The restart is using the service command
changing the script to:
/etc/init.d/exim4 restart
works fine.
The path for cron is /usr/bin:/bin ( no /usr/sbin where service lives)
So the path for service is not found - thus no service.
To test this - set up a cron job that runs env > ~/tmp
Then look at tmp
-
--
Save electrons! Don't put stupid tag-lines like this in emails.
-kps
--------------------------------------------------------------------------------