From 30012dbda6ac6fd4e2f11707c93aedd8ef7b86b6 Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Wed, 25 Sep 2013 19:29:06 +0600 Subject: Update. --- backup-lima | 6 +++--- f7-script.sh | 3 +-- sibsac-vpn | 9 ++------- skype | 10 ++++++++++ smartinfo | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 48 insertions(+), 12 deletions(-) create mode 100755 skype create mode 100755 smartinfo diff --git a/backup-lima b/backup-lima index 0ec7fe3..5bece8b 100755 --- a/backup-lima +++ b/backup-lima @@ -2,7 +2,7 @@ set +e -DEST=diskstation:/volume1/backup/lima +DEST=anton@bonn:/mnt/mirror/backup/lima { echo /bin @@ -10,10 +10,10 @@ DEST=diskstation:/volume1/backup/lima echo /dev echo /home/anton/Music echo /home/anton/Videos - echo /home/anton/.miro/Movies echo /home/anton/.cache echo /home/anton/.thumbnails echo /home/anton/.local/share/Trash + echo /home/anton/.m2 echo /initrd.img echo /initrd.img.old echo /lib @@ -37,4 +37,4 @@ DEST=diskstation:/volume1/backup/lima echo /var/lib echo /vmlinuz echo /vmlinuz.old -} | sudo rsync --archive --verbose --compress --progress --human-readable --delete --delete-excluded --delete-after --exclude-from=- -xdev -e ssh / /home "$DEST" +} | sudo rsync --archive --verbose --compress --progress --human-readable --delete --delete-excluded --exclude-from=- -xdev -e "ssh -i $HOME/.ssh/id_rsa" / /home "$DEST" diff --git a/f7-script.sh b/f7-script.sh index ab3178b..6607b0c 100755 --- a/f7-script.sh +++ b/f7-script.sh @@ -3,7 +3,7 @@ set -e INTERNAL=LVDS1 -EXTERNAL=VGA1 +EXTERNAL=HDMI1 show_usage() { cat </dev/null 2>&1) ; then + "$SCR" & + fi +fi +PULSE_LATENCY_MSEC=30 exec /usr/bin/skype $* diff --git a/smartinfo b/smartinfo new file mode 100755 index 0000000..a98c0cc --- /dev/null +++ b/smartinfo @@ -0,0 +1,32 @@ +#!/bin/bash +# Get device S.M.A.R.T. and store in appropriate file. + +set -e + +die() { + echo $1 + exit 1 +} + +get_file_name() { + sn=$(sed -n 's/Serial Number: \+//p' < "$1" | tr ' ' '_') + printf 'smart-%s-%s.txt' "$sn" "$(date +%F)" +} + +[ -b "$1" ] && DEVICE="$1" || die 'First parameter must be block device.' + +tmp=$(tempfile) +sudo smartctl -Ai "$DEVICE" > "$tmp" +fname=$(get_file_name "$tmp") +if [ -f "$fname" ] ; then + echo "File $fname already exists. Override? [yN] " + read answer + case "$answer" in + y|Y) + ;; + *) + exit 0 + ;; + esac +fi +mv "$tmp" "$fname" -- cgit v1.2.3