summaryrefslogtreecommitdiff
path: root/examples/Watchdog/clewarewatchdog
diff options
context:
space:
mode:
authorDonghoon Shin <dhs.shin@samsung.com>2016-09-19 17:36:01 +0900
committerDonghoon Shin <dhs.shin@samsung.com>2016-09-19 17:36:01 +0900
commite8acd13cc87ea038ecd6103e4088ce3cf5d501d7 (patch)
tree4c7c8cc683a297463996aa286f2f7758e8691b8f /examples/Watchdog/clewarewatchdog
parentb95c2492274542bc4718a863f5d88f37a0a788ab (diff)
downloadclewarecontrol-submit/trunk/20201029.132130.tar.gz
clewarecontrol-submit/trunk/20201029.132130.tar.bz2
clewarecontrol-submit/trunk/20201029.132130.zip
Change-Id: I59bac2188ffbfe5a2ad2d9dcb33847aabfaffe44
Diffstat (limited to 'examples/Watchdog/clewarewatchdog')
-rwxr-xr-xexamples/Watchdog/clewarewatchdog34
1 files changed, 34 insertions, 0 deletions
diff --git a/examples/Watchdog/clewarewatchdog b/examples/Watchdog/clewarewatchdog
new file mode 100755
index 0000000..c7bc3b4
--- /dev/null
+++ b/examples/Watchdog/clewarewatchdog
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Startup script for program
+#
+# chkconfig: 12345 1 1 - This statement tells the chkconfig command how to add or delete this process to the boot process
+# description: Starts the process which pads the Cleware watchdog.
+# processname: clewarecontrol
+
+# Source function library. This creates the operating environment for the process to be started
+. /etc/rc.d/init.d/functions
+
+case "$1" in
+ start)
+ echo -n "Starting Cleware watchdog "
+ /usr/bin/clewarecontrol -w
+ echo
+ touch /var/lock/subsys/clewarecontrol
+ ;;
+ stop)
+ echo -n "Shutting down Cleware watchdog: "
+ killproc clewarecontrol
+ echo
+ rm -f /var/lock/subsys/clewarecontrol
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit 0