summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Cozic <laurent22@users.noreply.github.com>2018-06-13 20:13:30 +0100
committerGitHub <noreply@github.com>2018-06-13 20:13:30 +0100
commitae564afa9c54963298bd6d0bd7b15e5c919a3217 (patch)
treee1a48740b8a6d4a56632dd9694869aafd8269145
parent5e0f3bb09dc76a22d7ca089b5ef9b1b9cb7caeb9 (diff)
parent487fd112c11f29b25f2c4a34d0cccf36a713a97e (diff)
Merge pull request #124 from cr1901/netbsd
NetBSD Fixes
-rwxr-xr-xrsync_tmbackup.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/rsync_tmbackup.sh b/rsync_tmbackup.sh
index 63a863f..a8723e7 100755
--- a/rsync_tmbackup.sh
+++ b/rsync_tmbackup.sh
@@ -59,6 +59,7 @@ fn_parse_date() {
case "$OSTYPE" in
linux*) date -d "${1:0:10} ${1:11:2}:${1:13:2}:${1:15:2}" +%s ;;
cygwin*) date -d "${1:0:10} ${1:11:2}:${1:13:2}:${1:15:2}" +%s ;;
+ netbsd*) date -d "${1:0:10} ${1:11:2}:${1:13:2}:${1:15:2}" +%s ;;
darwin8*) yy=`expr ${1:0:4}`
mm=`expr ${1:5:2} - 1`
dd=`expr ${1:8:2}`
@@ -369,6 +370,12 @@ if [ -n "$(fn_find "$INPROGRESS_FILE")" ]; then
fn_log_error "Previous backup task is still active - aborting (command: $RUNNINGCMD)."
exit 1
fi
+ elif [[ "$OSTYPE" == "netbsd"* ]]; then
+ RUNNINGPID="$(fn_run_cmd "cat $INPROGRESS_FILE")"
+ if ps -axp "$RUNNINGPID" -o "command" | grep "$APPNAME" > /dev/null; then
+ fn_log_error "Previous backup task is still active - aborting."
+ exit 1
+ fi
else
RUNNINGPID="$(fn_run_cmd "cat $INPROGRESS_FILE")"
if [ "$RUNNINGPID" = "$(pgrep -o -f "$APPNAME")" ]; then