aboutsummaryrefslogtreecommitdiff
path: root/etc/brep
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-01 15:17:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-17 19:08:52 +0200
commit2fda89944fa528e05c9f6b4fdcd684f2606582a8 (patch)
treeeca5e9c84e2673c8e3bfd38101a398d928bef671 /etc/brep
parent1a1d291b1e8e33888013a05302a0de3511f0251a (diff)
Create brep services controlling scripts
Diffstat (limited to 'etc/brep')
-rwxr-xr-xetc/brep31
1 files changed, 31 insertions, 0 deletions
diff --git a/etc/brep b/etc/brep
new file mode 100755
index 0000000..3ec448b
--- /dev/null
+++ b/etc/brep
@@ -0,0 +1,31 @@
+#!/bin/sh
+# file : etc/brep
+# copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+#
+# Designed to simplify controlling brep services.
+
+CMD="$1"
+SCRIPT_DIR=`dirname $0`
+
+case $CMD in
+ start|stop|status) ;;
+ *)
+ echo "Usage: brep (start|stop|status)"
+ exit 1
+ ;;
+esac
+
+case $CMD in
+ start)
+ $SCRIPT_DIR/pgctl start && $SCRIPT_DIR/apachectl start
+ ;;
+ stop)
+ $SCRIPT_DIR/apachectl stop
+ $SCRIPT_DIR/pgctl stop
+ ;;
+ status)
+ $SCRIPT_DIR/pgctl status
+ $SCRIPT_DIR/apachectl status
+ ;;
+esac