aboutsummaryrefslogtreecommitdiff
path: root/etc/dev/brep
blob: 3ec448b6bee520983a6bba5d735da0a1c76cadf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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