aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2022-05-08 13:35:46 -0300
committerSilvio Rhatto <rhatto@riseup.net>2022-05-08 13:35:46 -0300
commitc213e6cde571943138f603a9ef26229ae5979c82 (patch)
tree8d9acf93a3818d50d5ae212a41d6f2010c7f821b
parent12a9ece816315a3ab363b6c4ce37aca639cb3d55 (diff)
downloadhydra-c213e6cde571943138f603a9ef26229ae5979c82.tar.gz
hydra-c213e6cde571943138f603a9ef26229ae5979c82.tar.bz2
Fix: hydractl: sync-backups: check for regular user
-rwxr-xr-xshare/hydractl/sync-backups3
1 files changed, 3 insertions, 0 deletions
diff --git a/share/hydractl/sync-backups b/share/hydractl/sync-backups
index bcc2836..cb905a3 100755
--- a/share/hydractl/sync-backups
+++ b/share/hydractl/sync-backups
@@ -60,6 +60,9 @@ function sync_backups_node {
if [ -z "$VOLUME" ]; then
echo "usage: $BASENAME <media> [nodes]"
exit 1
+elif [ "$WHOAMI" == 'root' ]; then
+ echo "Please run this command as the root user"
+ exit 1
else
shift
fi