summaryrefslogtreecommitdiffstats
path: root/tools/linux/ck-system-stop
diff options
context:
space:
mode:
Diffstat (limited to 'tools/linux/ck-system-stop')
-rwxr-xr-xtools/linux/ck-system-stop12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/linux/ck-system-stop b/tools/linux/ck-system-stop
new file mode 100755
index 0000000..e26bca3
--- /dev/null
+++ b/tools/linux/ck-system-stop
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+#Try for common tools
+if [ -x "/sbin/shutdown" ] ; then
+ /sbin/shutdown -h now
+ exit $?
+elif [ -x "/usr/sbin/shutdown" ] ; then
+ /usr/sbin/shutdown -h now
+ exit $?
+else
+ exit 1
+fi