소스 검색

Simple startstop script for konfd

git-svn-id: https://klish.googlecode.com/svn/trunk@390 0eaa4687-2ee9-07dd-09d9-bcdd2d2dd5fb
Serj Kalichev 13 년 전
부모
커밋
d800dafbe9
1개의 변경된 파일24개의 추가작업 그리고 0개의 파일을 삭제
  1. 24 0
      contrib/konfd.init

+ 24 - 0
contrib/konfd.init

@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# Check for missing binaries
+BIN=/usr/bin/konfd
+test -x $BIN || exit 5
+
+PID=/var/run/konfd.pid
+
+case "$1" in
+start)
+	echo "Starting konfd daemon..."
+	test -r $PID && { echo "The service is already running."; exit 1; }
+	$BIN -p $PID
+	;;
+stop)
+	echo "Stopping konfd daemon..."
+	test ! -r $PID && { echo "The service is not running."; exit 1; }
+	kill $(cat $PID)
+	;;
+*)
+	echo "Usage: $0 {start|stop}"
+	exit 1
+	;;
+esac