From 9468f9b06028ff81ae4f10a6ce90ddce41f08c32 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Oct 2013 23:28:38 +0200 Subject: [PATCH] update Signed-off-by: Nico Schottelius --- .gitignore | 1 + 3xterm | 4 ++-- acpi-lid-close | 2 ++ backup-marker | 0 figlet_alle_fonts | 3 ++- generate_mutt_mailboxes | 7 ++++++- get-latest-kernel | 2 +- hole_mails | 1 + ikiwikitest.sh | 4 ++-- kamerasync | 4 ++-- linux/build-install | 2 +- linux/install | 13 ++++++++++--- localscript | 2 +- lock-screen | 5 +++-- mount-loch | 2 +- my-status-bar | 1 - nz | 6 ++---- release_tmp | 4 ++-- ressh.sh | 2 +- securemail | 16 +++++++++++++--- securemail.off | 5 +++-- suspend | 6 +++--- sync-from-loch | 3 +++ sync-to-loch | 9 +++++++-- vim-term | 3 ++- webseite-saugen | 2 +- wlan | 26 ++++++++++++++++++-------- x-gedreht | 4 ++-- x-gleich | 3 ++- x-links | 7 ++++--- x-oben | 9 ++++----- x-off | 2 +- x-rechts | 3 +++ x-vga | 3 ++- 34 files changed, 108 insertions(+), 58 deletions(-) mode change 100644 => 100755 backup-marker diff --git a/.gitignore b/.gitignore index dda8369..a91bea8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ schwanz3*sh .mac-adresses-csv-to-dhcpd.sh.swp .*.swp +sut diff --git a/3xterm b/3xterm index 3ae53bb..b788078 100755 --- a/3xterm +++ b/3xterm @@ -5,5 +5,5 @@ XTERM=x-terminal-emulator $XTERM -ls -title "--irst 0n3xx" & $XTERM -ls -title ">>> 2nd <<<" & $XTERM -ls -title "www.3rd.xterm" & -sleep 0.5 -i3-msg mh +# sleep 0.5 +# i3-msg mh diff --git a/acpi-lid-close b/acpi-lid-close index 0877eb1..67b90a7 100755 --- a/acpi-lid-close +++ b/acpi-lid-close @@ -3,4 +3,6 @@ if grep -q closed /proc/acpi/button/lid/*/state; then sleep 3 su nico -c "DISPLAY=:0.0 xset dpms force off" +else + su nico -c "DISPLAY=:0.0 xset dpms force on" fi diff --git a/backup-marker b/backup-marker old mode 100644 new mode 100755 diff --git a/figlet_alle_fonts b/figlet_alle_fonts index 9c6dcde..54aa447 100755 --- a/figlet_alle_fonts +++ b/figlet_alle_fonts @@ -9,4 +9,5 @@ cd /usr/share/figlet cd /usr/share/figlet/fonts/ #for a in *.flf; do BLA=${a%.flf}; echo $BLA; echo hallo | figlet -f $BLA; done #for a in *.flf; do BLA=${a%.flf}; echo $BLA; echo CM Bofs | figlet -f $BLA; done -for a in *.flf; do BLA=${a%.flf}; echo $BLA ; echo $BLA | figlet -f $BLA; done +#for a in *.flf; do BLA=${a%.flf}; echo $BLA ; echo $BLA | figlet -f $BLA; done +for a in *.flf; do BLA=${a%.flf}; echo $BLA ; echo cdist | figlet -f $BLA; done diff --git a/generate_mutt_mailboxes b/generate_mutt_mailboxes index a40e356..6add154 100755 --- a/generate_mutt_mailboxes +++ b/generate_mutt_mailboxes @@ -11,7 +11,7 @@ #firstfile=~/.mutt/preferred_mailboxes -echo 'set folder="~/Maildir"' +#echo 'set folder="~/Maildir"' if [ -f ~/.mutt/important_mailboxes ]; then cat ~/.mutt/important_mailboxes @@ -23,3 +23,8 @@ find ~/Maildir/ -type d -name new | \ -e s'/mailboxes +postponed\///g' \ -e 's/mailboxes +$//g' | \ grep -v '^$' + +if [ -f ~/.mutt/unimportant_mailboxes ]; then + cat ~/.mutt/unimportant_mailboxes +fi + diff --git a/get-latest-kernel b/get-latest-kernel index cfb42f4..471b523 100755 --- a/get-latest-kernel +++ b/get-latest-kernel @@ -25,4 +25,4 @@ EXTENSION=".tar.bz2" FULL_URL=${BASEURL}${VERSION}${EXTENSION} -wget "$FULL_URL" +wget -c "$FULL_URL" diff --git a/hole_mails b/hole_mails index 1ea2170..3ec5a5b 100755 --- a/hole_mails +++ b/hole_mails @@ -10,6 +10,7 @@ fi while true; do fetchmail >/dev/null offlineimap + fetchmail >/dev/null echo "Mails abgeholt, schlafe nun $SLEEP Sekunde(n)" sleep $SLEEP; done diff --git a/ikiwikitest.sh b/ikiwikitest.sh index 7916f2a..9c0e666 100755 --- a/ikiwikitest.sh +++ b/ikiwikitest.sh @@ -1,12 +1,13 @@ #!/bin/sh set -x -BDIR=~/temp/build/ikiwiki +BDIR=~/p/foreign/ikiwiki ( cd "${BDIR}" && git describe ) START="$(date)" PERL5LIB=${BDIR} ${BDIR}/ikiwiki.in \ --setup ikiwiki.setup \ + --templatedir ${BDIR}/templates \ "$@" ret=$? END="$(date)" @@ -15,4 +16,3 @@ echo ${START} - ${END}: ikiwiki result: $? # -set underlaydir=${BDIR}/underlays/basewiki \ # -set underlaydirbase=${BDIR}/underlays \ # --libdir ${BDIR} \ -# --templatedir ${BDIR}/templates \ diff --git a/kamerasync b/kamerasync index 4debad5..a9cad31 100755 --- a/kamerasync +++ b/kamerasync @@ -26,7 +26,7 @@ set -ex dev="$1" destbase=~nico/photos dest=$destbase/$(date +%Y%m%d).eingehend -mp="/mnt" +mp="/mnt/kamera" if [ ! -e "$destbase" ]; then echo "base $destbase not existing" >&2 @@ -38,5 +38,5 @@ sudo mount "$dev" "$mp" -o uid=nico mv -i "$mp/DCIM/"*/* "$dest" sudo umount "$mp" sudo chown -R nico "$dest" -su nico -c "cd $dest && renrot IMG_*.*" +su nico -c "cd $dest && renrot IMG_*.JPG DSC*JPG" rm -f $dest/*_orig diff --git a/linux/build-install b/linux/build-install index 36553d6..6538d27 100755 --- a/linux/build-install +++ b/linux/build-install @@ -38,5 +38,5 @@ parallel="-j8" make $parallel all # install - sudo ~/bin/linux/install + echo sudo ~/bin/linux/install "$1" ) diff --git a/linux/install b/linux/install index 148a3d5..b112c5f 100755 --- a/linux/install +++ b/linux/install @@ -23,11 +23,18 @@ set -e version=$(cat include/config/kernel.release) ddir="/boot" spath="arch/x86/boot/bzImage" -fname="vmlinuz-$version" -fname="vmlinuz-nico" + +if [ "$#" -ne 1 ]; then + echo "Give suffix for kernel" + exit 1 +fi + +basename="$1" + +fname="vmlinuz-$basename" fpath="${ddir}/${fname}" gpath="$ddir/grub/menu.lst" -initramfs="/boot/initramfs-nico.img" +initramfs="/boot/initramfs-${basename}.img" #make install diff --git a/localscript b/localscript index 5039387..dfcbf3b 100755 --- a/localscript +++ b/localscript @@ -1,3 +1,3 @@ #!/bin/sh -script -a ~/localch/logs/$(date +%Y-%m-%d).script "$@" +script -a ~/localch/vcs/logs/$(date +%Y-%m-%d).script "$@" diff --git a/lock-screen b/lock-screen index f21da56..b51a510 100755 --- a/lock-screen +++ b/lock-screen @@ -1,4 +1,5 @@ #!/bin/sh -~/b/i3lock/i3lock -t -i /home/users/nico/oeffentlich/bilder/linux-tux-bsd/think_linux_kachel.png -xset dpms force off +i3lock -c fe0000 -d +#~/b/i3lock/i3lock -t -i /home/users/nico/oeffentlich/bilder/linux-tux-bsd/think_linux_kachel.png +# xset dpms force off diff --git a/mount-loch b/mount-loch index 46779c0..f76ce9a 100755 --- a/mount-loch +++ b/mount-loch @@ -1 +1 @@ -sshfs nutzer@loch.schottelius.org:/ ~/.loch +sshfs nutzer@loch:/ ~/.loch diff --git a/my-status-bar b/my-status-bar index 77afac1..d4edfb9 100755 --- a/my-status-bar +++ b/my-status-bar @@ -1,6 +1,5 @@ #!/bin/sh - i3status | while : do read line diff --git a/nz b/nz index 78787bb..42d790a 100755 --- a/nz +++ b/nz @@ -1,7 +1,5 @@ #!/bin/sh ddir="${HOME}/privat/persoenlich/notizen" -file=$(date +%Y-%m-%d) -dfile="${ddir}/${file}" -set -x -$EDITOR "${dfile}" +cd "$ddir" +lh "$@" diff --git a/release_tmp b/release_tmp index 32a5317..3f4c437 100755 --- a/release_tmp +++ b/release_tmp @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/sh -e -file=$1 +file="$1" host=home.schottelius.org dir=public_html/temp/ url="http://home.schottelius.org/~nico/temp" diff --git a/ressh.sh b/ressh.sh index 69b4493..c73f3c3 100755 --- a/ressh.sh +++ b/ressh.sh @@ -6,7 +6,7 @@ # while true; do + reset ssh "$@" read foo - reset done diff --git a/securemail b/securemail index b4816ad..1e1bd43 100755 --- a/securemail +++ b/securemail @@ -20,11 +20,21 @@ HOST="nico@62.65.138.78" HOST="home.schottelius.org" HOST="nico@77.109.138.222" -ssh -T -f -C -N -L2323:mx3.schottelius.org:$IMAPS "$HOST" -ssh -T -f -C -N -L4241:mx3.schottelius.org:$SMTP "$HOST" +if [ $# -ge 1 ]; then + HOST=$1; shift +fi + +ssh -T -f -C -N \ + -L2323:mx3.schottelius.org:$IMAPS \ + -L4241:mx3.schottelius.org:$SMTP \ + -L2324:imap.googlemail.com:$IMAPS \ + -L2325:mail.zhaw.ch:$IMAPS \ + -R :4242:localhost:22 \ + -D 12345 \ + "$HOST" "$@" # Fernzugriff -ssh -T -f -C -N -R4242:localhost:22 "$HOST" +# ssh -T -f -C -N -R4242:localhost:22 "$HOST" #ssh -T -f -C -N -L2342:mx2.schottelius.org:$SMTP 62.65.138.66 #ssh -T -f -C -N -L4242:imaps.schottelius.org:$IMAPS "$HOST" diff --git a/securemail.off b/securemail.off index 4b661f4..7add620 100755 --- a/securemail.off +++ b/securemail.off @@ -4,5 +4,6 @@ # Kill ssh tunnels # -pkill -f -u nico "ssh -T -f -C -N -L" -pkill -f -u nico "ssh -T -f -C -N -R" +#pkill -f -u nico "ssh -T -f -C -N -L" +#pkill -f -u nico "ssh -T -f -C -N -R" +pkill -f -u nico "ssh -T -f -C -N" diff --git a/suspend b/suspend index 2f4ffd4..3a19063 100755 --- a/suspend +++ b/suspend @@ -1,5 +1,5 @@ #!/bin/sh -xtrlock & -sudo /usr/sbin/pm-suspend -#echo mem > /sys/power/state +#xtrlock & +#sudo "echo mem > /sys/power/state" +~/bin/lock-screen && sudo /usr/sbin/pm-suspend diff --git a/sync-from-loch b/sync-from-loch index e4fcd9e..52bc882 100755 --- a/sync-from-loch +++ b/sync-from-loch @@ -19,5 +19,8 @@ dst=$1; shift sshdir=$(cd "$__abs_mydir/../.ssh" && pwd -P) sshkey=$sshdir/id_rsa +d1=$(date) set -x rsync -av -e "ssh -i $sshkey" --delete "$src" "$dst" +echo $d1 +date diff --git a/sync-to-loch b/sync-to-loch index 34740a7..2ccb4dc 100755 --- a/sync-to-loch +++ b/sync-to-loch @@ -1,15 +1,20 @@ #!/bin/sh start=$(date) + +~nico/bin/backup-marker + rsync -av --delete --progress \ --exclude '/proc/*' \ --exclude '/tmp/*' \ --exclude '/sys/*' \ --exclude '/dev/*' \ --exclude '/home/users/nico/.bitcoin/blocks/' \ - --exclude '/home/users/nico/.bitcoin/chainstate/' \ + --exclude '/home/services/usbhd' \ "$@" \ - / root@rrloch:/home/services/buch/backup/bento + / root@loch:/home/services/backup/bento-manuell + #/ root@zuhause.schottelius.org:/home/services/backup/bento-manuell + #/ root@zuhause.schottelius.org:/home/services/backup/bento-manuell end=$(date) echo $start diff --git a/vim-term b/vim-term index 16f64ba..f375aca 100755 --- a/vim-term +++ b/vim-term @@ -1,4 +1,5 @@ #!/bin/sh # Open vim -x-terminal-emulator -e vim "$@" +# x-terminal-emulator -e vim "$@" +urxvt -e vim "$@" diff --git a/webseite-saugen b/webseite-saugen index 0cc2e24..57c38da 100755 --- a/webseite-saugen +++ b/webseite-saugen @@ -1 +1 @@ -wget -x -l 1 -r -k -p -H -N "$@" +wget -x -l 1 -r -k -p -H -N -E "$@" diff --git a/wlan b/wlan index ac7ffc1..8899129 100755 --- a/wlan +++ b/wlan @@ -2,31 +2,41 @@ # Nico Schottelius, 20080910 11:09 # The initial version # -# udhcpc -nfqi wlan0 && vpnc ~nico/ethz/vpn/pc.conf +# udhcpc -nfqi wlp0s3 && vpnc ~nico/ethz/vpn/pc.conf # # Failed due to many reasons. See the working hack/version below. # # -#ip link set wlan0 down -#iwconfig wlan0 essid public -#ip link set wlan0 up -#iwconfig wlan0 essid public +#ip link set wlp0s3 down +#iwconfig wlp0s3 essid public +#ip link set wlp0s3 up +#iwconfig wlp0s3 essid public + +dev=wlp2s0 +dev=wlp3s0 set -x +set +e +wpa_cli terminate || true +#rmmod b43 bcma +sleep 1 +#modprobe b43 +set -e #ip l s eth0 down # Ensure previous wpa_supplicant is not running ( wpa_cli terminate || exit 0 ) # Ensure the adapter works, reloading the driver helps -( rmmod iwlagn; modprobe iwlagn; sleep 2 ) +# ( rmmod iwlagn; modprobe iwlagn; sleep 2 ) -wpa_supplicant -B -Dwext -iwlan0 -c ~nico/ethz/wlan/wpa_supplicant.conf +# wpa_supplicant -B -Dwext -iwlp0s3 -c /etc/wpa_supplicant/wpa_supplicant.conf +wpa_supplicant -B -Dwext -i$dev -c /etc/wpa_supplicant/wpa_supplicant.conf # Give wpa some time to connect sleep 5 # Choose an dhcp client -( udhcpc -nqfi wlan0 || dhcpcd wlan0 ) +( udhcpc -nqfi $dev || dhcpcd ) # vpnc ~nico/ethz/vpn/sg.conf #vpnc ~nico/firmen/ethz/vpn/vpnc.conf diff --git a/x-gedreht b/x-gedreht index 5ffda5f..f384c15 100755 --- a/x-gedreht +++ b/x-gedreht @@ -1,4 +1,4 @@ #!/bin/sh -# xrandr --output HDMI2 --auto --above LVDS1 +# xrandr --output HDMI1 --auto --above DP1 xrandr --output VGA1 --off -xrandr --output HDMI1 --auto --left-of LVDS1 --rotate left +xrandr --output HDMI1 --auto --left-of DP1 --rotate left diff --git a/x-gleich b/x-gleich index b25b26c..e3c17db 100755 --- a/x-gleich +++ b/x-gleich @@ -1,3 +1,4 @@ #!/bin/sh xrandr --output HDMI1 --off -xrandr --output VGA1 --auto --same-as LVDS1 +xrandr --output VGA1 --auto --same-as DP1 +xrandr --output DP1 --auto --same-as DP1 diff --git a/x-links b/x-links index 3af5042..e0ad036 100755 --- a/x-links +++ b/x-links @@ -1,4 +1,5 @@ #!/bin/sh -xrandr --output HDMI1 --off -xrandr --output DP1 --off -xrandr --output HDMI1 --auto --rotate normal --left-of eDP1 +x-off + +xrandr --output HDMI1 --auto --rotate normal --left-of LVDS1 +xrandr --output DP1 --auto --rotate normal --left-of LVDS1 diff --git a/x-oben b/x-oben index 70678d9..a5b99ac 100755 --- a/x-oben +++ b/x-oben @@ -1,7 +1,6 @@ #!/bin/sh -xrandr --output HDMI1 --off -xrandr --output DP1 --off +x-off -xrandr --output eDP1 --auto -xrandr --output HDMI1 --auto --rotate normal --above eDP1 -xrandr --output DP1 --auto --rotate normal --above eDP1 +xrandr --output HDMI1 --auto --rotate normal --above LVDS1 +xrandr --output DP1 --auto --rotate normal --above LVDS1 +xrandr --output VGA1 --auto --rotate normal --above LVDS1 diff --git a/x-off b/x-off index 4e0b4cd..1a11414 100755 --- a/x-off +++ b/x-off @@ -1,4 +1,4 @@ #!/bin/sh -xrandr --output HDMI2 --off +xrandr --output DP1 --off xrandr --output HDMI1 --off xrandr --output VGA1 --off diff --git a/x-rechts b/x-rechts index b3babc4..b5b385e 100755 --- a/x-rechts +++ b/x-rechts @@ -1,2 +1,5 @@ #!/bin/sh + +x-off +xrandr --output DP1 --auto --rotate normal --right-of LVDS1 xrandr --output HDMI1 --auto --rotate normal --right-of LVDS1 diff --git a/x-vga b/x-vga index 3ad3682..e3c17db 100755 --- a/x-vga +++ b/x-vga @@ -1,3 +1,4 @@ #!/bin/sh xrandr --output HDMI1 --off -xrandr --output VGA1 --auto --above LVDS1 +xrandr --output VGA1 --auto --same-as DP1 +xrandr --output DP1 --auto --same-as DP1