After upgrade my cron script does not find the command /usr/sbin/ssmtp
1
vote
1
answer
266
views
I have several raspberries running the same cron script but after updating/upgrading jessie on one of them i get
ssmtp:: command not found
I can run that command from the command-line but running the script from the command-line fails so not really a cron problem.
I am using full path:
/usr/sbin/ssmtp
And using that command on the command line executes fine
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
And here is snip of the script code
#!/bin/bash
set -o pipefail
mysendmail="/usr/sbin/ssmtp"
…
$(echo -e "To: $tophil\nSubject: $(hostname) $ip2" | $mysendmail $tophil 2>&1)
Asked by phil
(13 rep)
Sep 24, 2021, 09:45 AM
Last activity: Sep 25, 2021, 10:33 PM
Last activity: Sep 25, 2021, 10:33 PM