duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] Duplicity (GPG) fails in crontab only


From: Mikko Ohtamaa
Subject: Re: [Duplicity-talk] Duplicity (GPG) fails in crontab only
Date: Wed, 7 May 2014 01:10:13 +0300


> on some distros cron starts with an empty environment.

If your distribution has sudo command you can do something like this crontab:

sudo -i -H -u youruser /usr/local/bin/yourscript.sh

-i simulates login, meaning that .profile, .bashrc and such shell environment initialization script are run for the session.

-H enforces that HOME environment variable is set correctly for that user, so that scripts find ~/.gnupg style stuff.

Cheers,
Mikko

--
Mikko Ohtamaa
http://opensourcehacker.com
http://twitter.com/moo9000


reply via email to

[Prev in Thread] Current Thread [Next in Thread]