From cf4aed7452d5c11c5f9124879b02551afe08ef75 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 26 Feb 2014 14:24:29 +0100 Subject: [PATCH] update Signed-off-by: Nico Schottelius --- myremotegit | 16 +++++++++++----- securemail | 9 ++++++--- show_calendar | 7 ++++--- sync-to | 7 +++++-- wake-up | 3 +++ wlan | 10 ++++++++-- x-links | 4 ++-- x-oben | 6 +++--- x-rechts | 4 ++-- 9 files changed, 44 insertions(+), 22 deletions(-) diff --git a/myremotegit b/myremotegit index d5ee6c0..b85f516 100755 --- a/myremotegit +++ b/myremotegit @@ -24,21 +24,27 @@ host=git.schottelius.org dir="/home/services/git" -if [ $# -ne 2 ]; then - echo "$0 name description" +if [ $# -lt 2 ]; then + echo "$0 name description [remotename]" exit 1 fi name=$1; shift desc=$1; shift +if [ $# -ge 1 ]; then + remote=$1; shift +else + remote=origin +fi + remote_dir="$dir/$name" -remote="$host:$remote_dir" +remote_url="$host:$remote_dir" # Create on remote side ssh "$host" "GIT_DIR=$remote_dir git init" ssh "$host" "echo $desc > $remote_dir/description" # Initialise git -git remote add origin "$remote" -git push origin master +git remote add "$remote" "$remote_url" +git push "$remote" master diff --git a/securemail b/securemail index 1e1bd43..73184da 100755 --- a/securemail +++ b/securemail @@ -19,17 +19,20 @@ HOST="213.146.113.242" HOST="nico@62.65.138.78" HOST="home.schottelius.org" HOST="nico@77.109.138.222" +# HOST="root@backup1.ungleich.ch" if [ $# -ge 1 ]; then HOST=$1; shift fi + #-L2323:mx3.schottelius.org:$IMAPS \ + #-L4241:mx3.schottelius.org:$SMTP \ ssh -T -f -C -N \ - -L2323:mx3.schottelius.org:$IMAPS \ - -L4241:mx3.schottelius.org:$SMTP \ + -L2323:77.109.138.221:$IMAPS \ + -L4241:77.109.138.221:$SMTP \ -L2324:imap.googlemail.com:$IMAPS \ -L2325:mail.zhaw.ch:$IMAPS \ - -R :4242:localhost:22 \ + -R :4242:localhost:22 \ -D 12345 \ "$HOST" "$@" diff --git a/show_calendar b/show_calendar index 408de69..5b3eb66 100755 --- a/show_calendar +++ b/show_calendar @@ -13,16 +13,17 @@ # ----------------------- # -CALDIR=~/.calendar +CALDIR=~/.calendar/ if [ $# -lt 1 ]; then echo `basename $0` 'day.month [day.month.year]' exit 1 fi -grep_param="-e ^TO.DO:" +# grep_param="-e ^TO.DO:" for arg in "$@"; do grep_param="${grep_param} -e ^${arg}:" done -find "$CALDIR" -type f -exec egrep --with-filename -A 2 "$grep_param" {} \; +# set -x +find "$CALDIR" -type f -exec egrep --with-filename -A 2 $grep_param {} \; diff --git a/sync-to b/sync-to index 3c85dc3..17131e2 100755 --- a/sync-to +++ b/sync-to @@ -11,8 +11,8 @@ case "$dsthost" in loch) dst=root@loch:/home/services/backup/bento-manuell ;; - zuhause) - dst=root@zuhause.schottelius.org:/home/services/backup/bento-manuell + luchsingen) + dst=root@luchsingen.schottelius.org:/home/services/backup/bento-manuell ;; *) echo "Unknown $1" >&2 @@ -26,6 +26,9 @@ rsync -avS --delete --progress \ --exclude '/tmp/*' \ --exclude '/sys/*' \ --exclude '/dev/*' \ + --exclude '/run/*' \ + --exclude '/home/services/usbhd' \ + --exclude '/home/users/nico/.cache/chromium/' \ --exclude '/home/users/nico/.bitcoin/blocks/' \ --exclude '/home/users/nico/.bitcoin/chainstate/' \ "$@" \ diff --git a/wake-up b/wake-up index 32c55d9..7ffdd85 100755 --- a/wake-up +++ b/wake-up @@ -6,6 +6,9 @@ case "$host" in blank) mac=60:a4:4c:cf:f0:25 ;; + zucker) + mac=d4:9a:20:f8:cc:b4 + ;; *) echo "Unknown host $host" >&2 exit 1 diff --git a/wlan b/wlan index 8899129..229c7b2 100755 --- a/wlan +++ b/wlan @@ -12,8 +12,14 @@ #ip link set wlp0s3 up #iwconfig wlp0s3 essid public -dev=wlp2s0 -dev=wlp3s0 +if [ "$#" -ge 1 ]; then + dev=$1; shift +else + dev=wlp2s0 + dev=wlp3s0 + dev=wlan0 + dev=wlp1s0 +fi set -x set +e diff --git a/x-links b/x-links index e0ad036..c6dd090 100755 --- a/x-links +++ b/x-links @@ -1,5 +1,5 @@ #!/bin/sh x-off -xrandr --output HDMI1 --auto --rotate normal --left-of LVDS1 -xrandr --output DP1 --auto --rotate normal --left-of LVDS1 +xrandr --output HDMI1 --auto --rotate normal --left-of eDP1 +xrandr --output DP1 --auto --rotate normal --left-of eDP1 diff --git a/x-oben b/x-oben index a5b99ac..fe99a05 100755 --- a/x-oben +++ b/x-oben @@ -1,6 +1,6 @@ #!/bin/sh x-off -xrandr --output HDMI1 --auto --rotate normal --above LVDS1 -xrandr --output DP1 --auto --rotate normal --above LVDS1 -xrandr --output VGA1 --auto --rotate normal --above LVDS1 +xrandr --output HDMI1 --auto --rotate normal --above eDP1 +xrandr --output DP1 --auto --rotate normal --above eDP1 +xrandr --output VGA1 --auto --rotate normal --above eDP1 diff --git a/x-rechts b/x-rechts index b5b385e..f91f122 100755 --- a/x-rechts +++ b/x-rechts @@ -1,5 +1,5 @@ #!/bin/sh x-off -xrandr --output DP1 --auto --rotate normal --right-of LVDS1 -xrandr --output HDMI1 --auto --rotate normal --right-of LVDS1 +xrandr --output DP1 --auto --rotate normal --right-of eDP1 +xrandr --output HDMI1 --auto --rotate normal --right-of eDP1