enable using not as root

This commit is contained in:
Alexander Gabriel 2021-09-03 21:26:01 +02:00
parent da6cdadf6c
commit f3080bedde

View File

@ -5,15 +5,15 @@ then
case "$SSH_ORIGINAL_COMMAND" in
"rsync --server --sender -vlogDtprRe.iLsfxC --numeric-ids . /opt")
echo "$(/bin/date): OK: $SSH_ORIGINAL_COMMAND" >> $HOME/rsnapshothelper.log
exec $SSH_ORIGINAL_COMMAND
exec sudo $SSH_ORIGINAL_COMMAND
;;
"rsync --server --sender -vlogDtprRe.iLsfxC --numeric-ids . /etc")
echo "$(/bin/date): OK: $SSH_ORIGINAL_COMMAND" >> $HOME/rsnapshothelper.log
exec $SSH_ORIGINAL_COMMAND
exec sudo $SSH_ORIGINAL_COMMAND
;;
"mysqldump --all-databases")
echo "$(/bin/date): OK: $SSH_ORIGINAL_COMMAND" >> $HOME/rsnapshothelper.log
exec $SSH_ORIGINAL_COMMAND
exec sudo $SSH_ORIGINAL_COMMAND
;;
*)
echo "$(/bin/date): VIOLATION: $SSH_ORIGINAL_COMMAND" >> $HOME/rsnapshothelper.log