about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCharadon <dev@iotib.net>2022-07-27 18:47:38 -0400
committerCharadon <dev@iotib.net>2022-07-27 18:47:38 -0400
commit5ab17c998ef890ce0fe85e1e523a1b62dcb1bef5 (patch)
tree8efd456594dc86751cd397712cf2bc4d3e1341b4
parent8c4851a673fb0efcd7822bc96bff0b825c099521 (diff)
downloaddscip-5ab17c998ef890ce0fe85e1e523a1b62dcb1bef5.tar.gz
Fixed issues in daemon mode
-rwxr-xr-xdscip4
1 files changed, 3 insertions, 1 deletions
diff --git a/dscip b/dscip
index 6f3f542..6e3adbf 100755
--- a/dscip
+++ b/dscip
@@ -23,12 +23,14 @@ cd "$(dirname "$0")"
 ################################################################################
 
 # Move script to background if DSCIP_DAEMON_FORK is set to true #
+set +u
 if [ "$DSCIP_DAEMON" = "true" ]; then
 	if [ "$DSCIP_DAEMON_FORK" = "true" ] && [ ! "$FORKED" = "true" ]; then
 		FORKED=true nohup "$0" "$@" > /dev/null 2>&1
 		exit 0
 	fi
 fi
+set -u
 
 # Check if script is currently running, and if not, reset LOCK #
 if [ -f "$WORKING_DIRECTORY/LOCK" ]; then
@@ -120,7 +122,7 @@ run () {
 		elif [ ! "$LAST_COMMIT" = "$CURRENT_COMMIT" ]; then # If the last commit and current commit don't match, then we go ahead and build.
 			build
 		else
-			return
+			return 0
 		fi
 	else
 		build