From 58f8bba2a1936b43debec46d1ccb2a2ff1c5d674 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 16 Dec 2012 18:19:18 +0100 Subject: [PATCH] renamed bash scripts with suffix --- bash/{backupscript => backupscript.sh} | 0 bash/{changestation => changestation.sh} | 0 bash/{deviantbg => deviantbg.sh} | 0 bash/{flv2mp4 => flv2mp4.sh} | 0 bash/{fritzbox => fritzbox.sh} | 0 bash/{geo2gps => geo2gps.sh} | 0 bash/{getpanoramas => getpanoramas.sh} | 0 bash/{gps2gpx => gps2gpx.sh} | 0 bash/{gps2pc => gps2pc.sh} | 0 bash/{ipodvideo => ipodvideo.sh} | 0 bash/{m4a2mp3 => m4a2mp3.sh} | 0 bash/{mountcrypt => mountcrypt.sh} | 0 bash/{mousewheel => mousewheel.sh} | 0 bash/{netdev => netdev.sh} | 0 bash/{panel => panel.sh} | 0 bash/{pc2gps => pc2gps.sh} | 0 bash/{presentation => presentation.sh} | 0 bash/{sync => sync.sh} | 32 ++++++++++++++++++++---- bash/{boot => wakeonlan.sh} | 0 bash/{zyxel => zyxel.sh} | 0 20 files changed, 27 insertions(+), 5 deletions(-) rename bash/{backupscript => backupscript.sh} (100%) rename bash/{changestation => changestation.sh} (100%) rename bash/{deviantbg => deviantbg.sh} (100%) rename bash/{flv2mp4 => flv2mp4.sh} (100%) rename bash/{fritzbox => fritzbox.sh} (100%) rename bash/{geo2gps => geo2gps.sh} (100%) rename bash/{getpanoramas => getpanoramas.sh} (100%) rename bash/{gps2gpx => gps2gpx.sh} (100%) rename bash/{gps2pc => gps2pc.sh} (100%) rename bash/{ipodvideo => ipodvideo.sh} (100%) rename bash/{m4a2mp3 => m4a2mp3.sh} (100%) rename bash/{mountcrypt => mountcrypt.sh} (100%) rename bash/{mousewheel => mousewheel.sh} (100%) rename bash/{netdev => netdev.sh} (100%) rename bash/{panel => panel.sh} (100%) rename bash/{pc2gps => pc2gps.sh} (100%) rename bash/{presentation => presentation.sh} (100%) rename bash/{sync => sync.sh} (77%) rename bash/{boot => wakeonlan.sh} (100%) rename bash/{zyxel => zyxel.sh} (100%) diff --git a/bash/backupscript b/bash/backupscript.sh similarity index 100% rename from bash/backupscript rename to bash/backupscript.sh diff --git a/bash/changestation b/bash/changestation.sh similarity index 100% rename from bash/changestation rename to bash/changestation.sh diff --git a/bash/deviantbg b/bash/deviantbg.sh similarity index 100% rename from bash/deviantbg rename to bash/deviantbg.sh diff --git a/bash/flv2mp4 b/bash/flv2mp4.sh similarity index 100% rename from bash/flv2mp4 rename to bash/flv2mp4.sh diff --git a/bash/fritzbox b/bash/fritzbox.sh similarity index 100% rename from bash/fritzbox rename to bash/fritzbox.sh diff --git a/bash/geo2gps b/bash/geo2gps.sh similarity index 100% rename from bash/geo2gps rename to bash/geo2gps.sh diff --git a/bash/getpanoramas b/bash/getpanoramas.sh similarity index 100% rename from bash/getpanoramas rename to bash/getpanoramas.sh diff --git a/bash/gps2gpx b/bash/gps2gpx.sh similarity index 100% rename from bash/gps2gpx rename to bash/gps2gpx.sh diff --git a/bash/gps2pc b/bash/gps2pc.sh similarity index 100% rename from bash/gps2pc rename to bash/gps2pc.sh diff --git a/bash/ipodvideo b/bash/ipodvideo.sh similarity index 100% rename from bash/ipodvideo rename to bash/ipodvideo.sh diff --git a/bash/m4a2mp3 b/bash/m4a2mp3.sh similarity index 100% rename from bash/m4a2mp3 rename to bash/m4a2mp3.sh diff --git a/bash/mountcrypt b/bash/mountcrypt.sh similarity index 100% rename from bash/mountcrypt rename to bash/mountcrypt.sh diff --git a/bash/mousewheel b/bash/mousewheel.sh similarity index 100% rename from bash/mousewheel rename to bash/mousewheel.sh diff --git a/bash/netdev b/bash/netdev.sh similarity index 100% rename from bash/netdev rename to bash/netdev.sh diff --git a/bash/panel b/bash/panel.sh similarity index 100% rename from bash/panel rename to bash/panel.sh diff --git a/bash/pc2gps b/bash/pc2gps.sh similarity index 100% rename from bash/pc2gps rename to bash/pc2gps.sh diff --git a/bash/presentation b/bash/presentation.sh similarity index 100% rename from bash/presentation rename to bash/presentation.sh diff --git a/bash/sync b/bash/sync.sh similarity index 77% rename from bash/sync rename to bash/sync.sh index fd10e67..77058c1 100755 --- a/bash/sync +++ b/bash/sync.sh @@ -24,10 +24,23 @@ # along with this script. If not, see . ## +# Hostname or IP address of remote box HOST=sea -MAX_SIZE=500 # Mbytes + +# Maximum file size. Larger files will be exluded +MAX_SIZE=500 + +# Nice factor for rsync NICENESS=10 -INTERVAL=30 # minutes + +# Interval in minutes to reschedule this script via at +# Set to 0 to disable +INTERVAL=180 + +# Choose own queue for sync jobs +# Uppercase letters will at let behave like batch +QUEUE=S + # Exclude files bigger than MAX_SIZE find $HOME -type f -size +$(($MAX_SIZE*1024))k > $HOME/rsync.large.exclude @@ -64,7 +77,8 @@ rsync \ --executability \ --links \ --compress \ - --progress --stats \ + --out-format=%f \ + --stats \ $HOME/ $HOST:$HOME/backup/ \ 2>&1 | tee -a $HOME/rsync.log @@ -81,8 +95,16 @@ if [ -x /usr/bin/notify-send ]; then -c "transfer.complete" \ -i "/usr/share/icons/gnome/256x256/actions/appointment.png" \ -u low -t 2000 \ - "Syncronisation comppleted" "$(tail -n16 ~/rsync.log)" + "Syncronisation completed" "$(tail -n16 ~/rsync.log)" +fi + +# Prune queue +JOBS=$(atq -q ${QUEUE} | cut -f 1 | xargs) +if [ -n "${JOBS}" ]; then + atrm ${JOBS} fi # Queue next run -echo "bash $0" | at "now + ${INTERVAL} minutes" +if [ ${INTERVAL} -ne 0 ]; then + echo "bash $0" | at -q ${QUEUE} "now + ${INTERVAL} minutes" +fi diff --git a/bash/boot b/bash/wakeonlan.sh similarity index 100% rename from bash/boot rename to bash/wakeonlan.sh diff --git a/bash/zyxel b/bash/zyxel.sh similarity index 100% rename from bash/zyxel rename to bash/zyxel.sh