aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydra/deploy3
-rwxr-xr-xshare/hydractl/sync-backups13
-rwxr-xr-xshare/hydractl/sync-home2
-rwxr-xr-xshare/hydractl/sync-tpc2
4 files changed, 16 insertions, 4 deletions
diff --git a/share/hydra/deploy b/share/hydra/deploy
index e440ae5..5fabb6c 100755
--- a/share/hydra/deploy
+++ b/share/hydra/deploy
@@ -151,6 +151,9 @@ for node in $NODES; do
# Fix ssl folder ownership
$SUDO chown -R `whoami`: $HYDRA_FOLDER/puppet/ssl
+ # Fix devices folder ownership
+ $SUDO chown -R `whoami`: $HYDRA_FOLDER/puppet/devices
+
# Import keys if needed
if ! $SUDO test -f /root/.ssh/id_rsa || \
! $SUDO test -f /root/.config/borg/hydra/key || \
diff --git a/share/hydractl/sync-backups b/share/hydractl/sync-backups
index 844d630..9cc79de 100755
--- a/share/hydractl/sync-backups
+++ b/share/hydractl/sync-backups
@@ -7,12 +7,21 @@
BASENAME="`basename $0`"
VOLUME="$1"
MEDIA="/media/$VOLUME"
-BWLIMIT=${BWLIMIT:=32000}
+BWLIMIT=${BWLIMIT:=0}
IMAGES="/var/data/crypt/"
-RSYNC="ionice -c 3 nice -n 19 rsync -avH --delete --bwlimit=$BWLIMIT"
CP="ionice -c 3 nice -n 19 cp"
WHOAMI="`whoami`"
+# Set bandwidth limit
+if [ "$BWLIMIT" != "0" ]; then
+ BWLIMIT="--bwlimit=$BWLIMIT"
+else
+ BWLIMIT=""
+fi
+
+# Build rsync command line
+RSYNC="ionice -c 3 nice -n 19 rsync -avH --delete $BWLIMIT"
+
# Sync backups for a node.
function sync_backups_node {
if [ ! -z "$NODE" ]; then
diff --git a/share/hydractl/sync-home b/share/hydractl/sync-home
index a0460e9..b2cd85f 100755
--- a/share/hydractl/sync-home
+++ b/share/hydractl/sync-home
@@ -4,7 +4,7 @@
#
# Parameters
-BASENAME="$0"
+BASENAME="`basename $0`"
TPC="$1"
DEST="/media/$1"
MEDIA="$DEST/var/cache/$TPC/media"
diff --git a/share/hydractl/sync-tpc b/share/hydractl/sync-tpc
index c739c5a..0a72866 100755
--- a/share/hydractl/sync-tpc
+++ b/share/hydractl/sync-tpc
@@ -4,7 +4,7 @@
#
# Parameters
-BASENAME="$0"
+BASENAME="`basename $0`"
TPC="$1"
DEST="/media/$1"
MEDIA="$DEST/var/cache/$TPC/media"