force start/stop by default in case pid file still exists master
force start/stop by default in case pid file still exists

--- a/init/common
+++ b/init/common
@@ -16,8 +16,7 @@
 NODE_EXEC="/usr/local/bin/forever"
 . /etc/default/piBeacon
 
-USAGE="Usage: $0 {start|stop|restart|status} [--force]"
-FORCE_OP=false
+USAGE="Usage: $0 {start|stop|restart|status}"
 
 pid_file_exists() {
 	[ -f "$PID_FILE" ]
@@ -84,12 +83,9 @@
 			exit 1
 		else
 			echo "Node app stopped, but pid file exists"
-			if [ $FORCE_OP = true ]
-			then
-				echo "Forcing start anyways"
-				remove_pid_file
-				start_it
-			fi
+			echo "Forcing start anyways"
+			remove_pid_file
+			start_it
 		fi
 	else
 		start_it
@@ -107,14 +103,9 @@
 			echo "Node app stopped"
 		else
 			echo "Node app already stopped, but pid file exists"
-			if [ $FORCE_OP = true ]
-			then
-				echo "Forcing stop anyways ..."
-				remove_pid_file
-				echo "Node app stopped"
-			else
-				exit 1
-			fi
+			echo "Forcing stop anyways ..."
+			remove_pid_file
+			echo "Node app stopped"
 		fi
 	else
 		echo "Node app already stopped, pid file does not exist"
@@ -136,20 +127,6 @@
 		echo "Node app stopped"
 	fi
 }
-
-case "$2" in
-	--force)
-		FORCE_OP=true
-	;;
-
-	"")
-	;;
-
-	*)
-		echo $USAGE
-		exit 1
-	;;
-esac
 
 case "$1" in
 	start)

comments