Tweak backup scripts to ensure sudo -H
is effectively in use
This commit is contained in:
parent
63b86593f1
commit
faefb60cd6
2 changed files with 23 additions and 5 deletions
|
@ -8,6 +8,15 @@ else
|
|||
CONFIG='/srv/envs/${envname}/app/silent.conf'
|
||||
fi
|
||||
|
||||
# sanity check
|
||||
if [ "$HOME" != '/root' ]; then
|
||||
echo ''
|
||||
echo '$HOME is not /root - please run this as e.g.:'
|
||||
echo ''
|
||||
echo ' sudo -H rattail-backup [--verbose]'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd /srv/envs/${envname}
|
||||
|
||||
bin/rattail -c $CONFIG $VERBOSE backup $*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue