aboutsummaryrefslogtreecommitdiff
path: root/cmd2admin.sh
diff options
context:
space:
mode:
authortoni <matzeton@googlemail.com>2014-11-03 15:28:03 +0100
committertoni <matzeton@googlemail.com>2014-11-03 15:28:03 +0100
commitebe18565ddc1de3bd04db67331dab943c59e785b (patch)
tree252bea12b89460e8d41ef1e0630d23b8c98f5e3a /cmd2admin.sh
parent8821ff4ea8e1c06954dc5ea2604ed6785652af47 (diff)
- sendxmpp scripts
- selinux build/insert/enable pol's script - selinux hald policy
Diffstat (limited to 'cmd2admin.sh')
-rwxr-xr-xcmd2admin.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/cmd2admin.sh b/cmd2admin.sh
new file mode 100755
index 0000000..2d213db
--- /dev/null
+++ b/cmd2admin.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+if [ "x${1}" != "x" ]; then
+ RUN_CMDS="${1}"
+else
+ send2admin "cmd2admin failed"
+fi
+
+if [ "x${2}" != "x" ]; then
+ send2admin "${2}"
+fi
+
+send2admin "RUN CMD: ${RUN_CMDS}"
+OUT=$(bash -c "${RUN_CMDS}")
+if [ $? -ne 0 ]; then
+ send2admin "CMD failed!"
+else
+ send2admin "CMD succeeded!"
+fi
+send2admin "output:\n${OUT}"
+exit 0