]> gitweb.fluxo.info Git - hydra.git/commitdiff
Fix: hydractl: sync-backups: check for regular user
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 8 May 2022 16:35:46 +0000 (13:35 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 8 May 2022 16:35:46 +0000 (13:35 -0300)
share/hydractl/sync-backups

index bcc283624c9e8d09c5d1c1c8e1d19d6eea1fbebc..cb905a3eecef3c8ccd0b843d025792ba20de9581 100755 (executable)
@@ -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