summaryrefslogtreecommitdiffstats
path: root/.displayrc.common
diff options
context:
space:
mode:
Diffstat (limited to '.displayrc.common')
-rw-r--r--.displayrc.common39
1 files changed, 39 insertions, 0 deletions
diff --git a/.displayrc.common b/.displayrc.common
new file mode 100644
index 0000000..54a6dc3
--- /dev/null
+++ b/.displayrc.common
@@ -0,0 +1,39 @@
+#!/bin/sh
+# TODO: Enable/disable actions
+
+type restart >/dev/null ||
+restart()
+{
+ stop
+ start
+}
+
+type reload >/dev/null ||
+reload()
+{
+ stop
+ start
+}
+
+usage()
+{
+ printf 'Usage: %s {start|stop|restart|reload}\n' "${0}"
+}
+
+main()
+{
+ local action="${1}"
+
+ case "${action}" in
+ 'start'|'stop'|'restart'|'reload');;
+ *)
+ usage >&2
+ return 1
+ ;;
+ esac
+
+ "${action}"
+ return ${?}
+}
+
+main "${@}"