Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
Nico Schottelius 2014-02-26 14:24:29 +01:00
parent 899979d3ba
commit cf4aed7452
9 changed files with 44 additions and 22 deletions

View File

@ -24,21 +24,27 @@
host=git.schottelius.org host=git.schottelius.org
dir="/home/services/git" dir="/home/services/git"
if [ $# -ne 2 ]; then if [ $# -lt 2 ]; then
echo "$0 name description" echo "$0 name description [remotename]"
exit 1 exit 1
fi fi
name=$1; shift name=$1; shift
desc=$1; shift desc=$1; shift
if [ $# -ge 1 ]; then
remote=$1; shift
else
remote=origin
fi
remote_dir="$dir/$name" remote_dir="$dir/$name"
remote="$host:$remote_dir" remote_url="$host:$remote_dir"
# Create on remote side # Create on remote side
ssh "$host" "GIT_DIR=$remote_dir git init" ssh "$host" "GIT_DIR=$remote_dir git init"
ssh "$host" "echo $desc > $remote_dir/description" ssh "$host" "echo $desc > $remote_dir/description"
# Initialise git # Initialise git
git remote add origin "$remote" git remote add "$remote" "$remote_url"
git push origin master git push "$remote" master

View File

@ -19,17 +19,20 @@ HOST="213.146.113.242"
HOST="nico@62.65.138.78" HOST="nico@62.65.138.78"
HOST="home.schottelius.org" HOST="home.schottelius.org"
HOST="nico@77.109.138.222" HOST="nico@77.109.138.222"
# HOST="root@backup1.ungleich.ch"
if [ $# -ge 1 ]; then if [ $# -ge 1 ]; then
HOST=$1; shift HOST=$1; shift
fi fi
#-L2323:mx3.schottelius.org:$IMAPS \
#-L4241:mx3.schottelius.org:$SMTP \
ssh -T -f -C -N \ ssh -T -f -C -N \
-L2323:mx3.schottelius.org:$IMAPS \ -L2323:77.109.138.221:$IMAPS \
-L4241:mx3.schottelius.org:$SMTP \ -L4241:77.109.138.221:$SMTP \
-L2324:imap.googlemail.com:$IMAPS \ -L2324:imap.googlemail.com:$IMAPS \
-L2325:mail.zhaw.ch:$IMAPS \ -L2325:mail.zhaw.ch:$IMAPS \
-R :4242:localhost:22 \ -R :4242:localhost:22 \
-D 12345 \ -D 12345 \
"$HOST" "$@" "$HOST" "$@"

View File

@ -13,16 +13,17 @@
# ----------------------- # -----------------------
# #
CALDIR=~/.calendar CALDIR=~/.calendar/
if [ $# -lt 1 ]; then if [ $# -lt 1 ]; then
echo `basename $0` 'day.month [day.month.year]' echo `basename $0` 'day.month [day.month.year]'
exit 1 exit 1
fi fi
grep_param="-e ^TO.DO:" # grep_param="-e ^TO.DO:"
for arg in "$@"; do for arg in "$@"; do
grep_param="${grep_param} -e ^${arg}:" grep_param="${grep_param} -e ^${arg}:"
done 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 {} \;

View File

@ -11,8 +11,8 @@ case "$dsthost" in
loch) loch)
dst=root@loch:/home/services/backup/bento-manuell dst=root@loch:/home/services/backup/bento-manuell
;; ;;
zuhause) luchsingen)
dst=root@zuhause.schottelius.org:/home/services/backup/bento-manuell dst=root@luchsingen.schottelius.org:/home/services/backup/bento-manuell
;; ;;
*) *)
echo "Unknown $1" >&2 echo "Unknown $1" >&2
@ -26,6 +26,9 @@ rsync -avS --delete --progress \
--exclude '/tmp/*' \ --exclude '/tmp/*' \
--exclude '/sys/*' \ --exclude '/sys/*' \
--exclude '/dev/*' \ --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/blocks/' \
--exclude '/home/users/nico/.bitcoin/chainstate/' \ --exclude '/home/users/nico/.bitcoin/chainstate/' \
"$@" \ "$@" \

View File

@ -6,6 +6,9 @@ case "$host" in
blank) blank)
mac=60:a4:4c:cf:f0:25 mac=60:a4:4c:cf:f0:25
;; ;;
zucker)
mac=d4:9a:20:f8:cc:b4
;;
*) *)
echo "Unknown host $host" >&2 echo "Unknown host $host" >&2
exit 1 exit 1

10
wlan
View File

@ -12,8 +12,14 @@
#ip link set wlp0s3 up #ip link set wlp0s3 up
#iwconfig wlp0s3 essid public #iwconfig wlp0s3 essid public
dev=wlp2s0 if [ "$#" -ge 1 ]; then
dev=wlp3s0 dev=$1; shift
else
dev=wlp2s0
dev=wlp3s0
dev=wlan0
dev=wlp1s0
fi
set -x set -x
set +e set +e

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
x-off x-off
xrandr --output HDMI1 --auto --rotate normal --left-of LVDS1 xrandr --output HDMI1 --auto --rotate normal --left-of eDP1
xrandr --output DP1 --auto --rotate normal --left-of LVDS1 xrandr --output DP1 --auto --rotate normal --left-of eDP1

6
x-oben
View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
x-off x-off
xrandr --output HDMI1 --auto --rotate normal --above LVDS1 xrandr --output HDMI1 --auto --rotate normal --above eDP1
xrandr --output DP1 --auto --rotate normal --above LVDS1 xrandr --output DP1 --auto --rotate normal --above eDP1
xrandr --output VGA1 --auto --rotate normal --above LVDS1 xrandr --output VGA1 --auto --rotate normal --above eDP1

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
x-off x-off
xrandr --output DP1 --auto --rotate normal --right-of LVDS1 xrandr --output DP1 --auto --rotate normal --right-of eDP1
xrandr --output HDMI1 --auto --rotate normal --right-of LVDS1 xrandr --output HDMI1 --auto --rotate normal --right-of eDP1