"bad variable name" in bash script started by cron -
"bad variable name" in bash script started by cron -
works fine when running manually on shell when setup cronjob run on reboot "bad variable name".
#! /bin/sh # /etc/init.d/duplicitycleanup export passphrase=foo duplicity remove-older-than 30d --force --gio smb://remote/archiv/ duplicity remove-all-but-n-full 1 --force --gio smb://remote/archiv/ unset passphrase
there space between #!
, /bin/sh
. don't think reported problem needs fixing
i guess using version of unix or linux /bin/sh
not bash export syntax wrong.
alter script say
passphrase=foo export passphrase
see reply unix export command
bash cron
Comments
Post a Comment