]> hackdaworld.org Git - outofuni/backup.git/commitdiff
just pick the date, no sed exp
authorhackbard <hackbard@hackdaworld.org>
Tue, 20 Oct 2015 14:27:51 +0000 (16:27 +0200)
committerhackbard <hackbard@hackdaworld.org>
Tue, 20 Oct 2015 14:27:51 +0000 (16:27 +0200)
bin/backupctrl

index f96e2fbc39f070286f1f5242990932c9404b163d..792d57fd80949fd7ce365ce7d96e9dd9b128f10a 100755 (executable)
@@ -6,8 +6,7 @@ function detect() {
        IFS=$'\n'
        for psline in `ps -ef | grep [r]sync`; do
                ppid="`echo $psline | awk '{ print $2 }'`"
-               pptime=`echo $psline | \
-                       sed 's/.*[0-9] \([0-9][0-9]:[0-9][0-9]\) \?.*/\1/'`
+               pptime=`echo $psline | awk '{ print $5 }'`
                ppcmd="`echo $psline | \
                        sed 's/.*\(rsync .*\)/\1/'`"
                echo