From 6b3b0b7d51a82c6e8a07cfd06049d02f5068cb85 Mon Sep 17 00:00:00 2001 From: Gerolf Ziegenhain Date: Mon, 9 Feb 2009 15:44:15 +0100 Subject: [PATCH] . --- .deb/etc/rc2.d/S77corvix_rbackup | 1 + .deb/opt/corvix/etc/init.d/rbackup | 7 +++++++ .deb/opt/corvix/sbin/last_has_failed | 25 +++++++++++++++++++++++++ .rbackup.swp | Bin 0 -> 12288 bytes 4 files changed, 33 insertions(+) create mode 120000 .deb/etc/rc2.d/S77corvix_rbackup create mode 100755 .deb/opt/corvix/etc/init.d/rbackup create mode 100755 .deb/opt/corvix/sbin/last_has_failed create mode 100644 .rbackup.swp diff --git a/.deb/etc/rc2.d/S77corvix_rbackup b/.deb/etc/rc2.d/S77corvix_rbackup new file mode 120000 index 0000000..8fdf67a --- /dev/null +++ b/.deb/etc/rc2.d/S77corvix_rbackup @@ -0,0 +1 @@ +../../opt/corvix/etc/init.d/rbackup \ No newline at end of file diff --git a/.deb/opt/corvix/etc/init.d/rbackup b/.deb/opt/corvix/etc/init.d/rbackup new file mode 100755 index 0000000..9182703 --- /dev/null +++ b/.deb/opt/corvix/etc/init.d/rbackup @@ -0,0 +1,7 @@ +#!/bin/sh +case $1 in + start) + nohup /opt/corvix/sbin/last_has_failed & + *) + exit 0 +esac diff --git a/.deb/opt/corvix/sbin/last_has_failed b/.deb/opt/corvix/sbin/last_has_failed new file mode 100755 index 0000000..a870dc2 --- /dev/null +++ b/.deb/opt/corvix/sbin/last_has_failed @@ -0,0 +1,25 @@ +#!/bin/zsh +. /opt/corvix/etc/rbackup.conf +[[ -e $HOME/.rbackup.conf ]] && . $HOME/.rbackup.conf + +LOGFILE=/opt/corvix/var/log/rbackup +RUNFILE=/opt/corvix/var/run/rbackup + +_has_failed() { + test -e $RUNFILE + return $? +} + +_log() { + echo $@ + echo $@ >> $LOGFILE +} + +_has_failed || exit 0 +_log "Last run has failed. Recover last interval" +TASK=$(cat $RUNFILE) +name=$TASK +path=$TARGET/$SOURCE +host=$HOST +/usr/bin/ssh $host "rsync -avP --link-dest=../$name.1 $path/$name.1/. $path/$name.0/." 2>&1 1>>$LOGFILE +/bin/rm $RUNFILE diff --git a/.rbackup.swp b/.rbackup.swp new file mode 100644 index 0000000000000000000000000000000000000000..5e3a32bc1894ca8eb3cf885489e7fa642c8ef216 GIT binary patch literal 12288 zcwX(A&u<$=6vrn>fC`i%en=c&w@a{t)*B~Lp^0n}5|fz3c4RxLs!~~-^*A2I-Zi^x zC!qyZLaIPq5T!?c-uMqVf+|(&0f9KcfxiGQoIsoi-|_BRc7DhQE~uKX^vUkbyxE!e z=Iu+>?Dq6lzCbUh(hPcvvEQ>FWzxHoa}j z-tBhc>$s^(N=pA(XW8sbdisKPo}PJnbDXh~l9G~=l9G~=lF|dFpfkY^aeW9>z(jl|ahfG@!p;1=kC%b*0_0CQj# zB*2T{S?~z>`$@)r1>b|a;B#;tybT1{07Xy$^B@5x!3*FyFaZwFGWHMn6Z{5#0zZNu zz+LbS_!@i$ZUX^ck#nA4>>hXzyaP7C^Wcxi8T%C60k^@&;1)Ol4zR!$m;xU@#@Gko zeQ*ZU3k$N{cAcQvI!IEySVk|Diq+Ni zE48>MG~DBSchv53F1L2ftZs=>tL4S~F{7s2^+v5$;n=8|ZTWE^gu~=Dqo?r?HaTA} zSFRM7$mo$_kzv$%iwE4``*y2a=XLZ%w?@Nr+w$RsoSBL~Ax%YNgL$NvHmVggTf*5z zpC4pWDN}c>HczEV_pw)-o1`~gKbY48%iG~WG(2t6Om;F&>1I6Fo}{LxJ`5Ie8n7XY^Uwkh3!SjJyqZAia-rDUqb>Q6%cF!{t>5 zrBYc9pG=xw*pkuFJ66z)_Nt4K=9_vVp^KN&$)pzgaMX!`ALTG7eaGtfO&3We1}Ym*@V;O{Um6(9toT+=?R~|Mg9Fa0rz@V%fPnCNYiw30Uq{^ z#YtY43uJhWqkcvY(M~*@fm_Sr;q(2D@Q^b@?nU!Qy%de{ZpIU(w+j?Bxx-Em4y6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