Merge branch 'pu'
[jungerl.git] / lib / wiki / bin / wiki.sh
blob5c6901d49f19848758728810df73b4e29b810bef
1 #!/bin/sh
3 ##
4 ## usage wiki.sh {start|stop|debug}
5 ##
7 ## These point to where
8 ## The the wiki code and database is store
9 ## WIKI = path to the wiki ebin
10 ## PICO = path to the pico ebin
11 ## STORE = path to the wiki store
12 ## PORT = listen port
14 # These paths are set up to work from a checked out jungerl source tree.
15 # Run this script with jungerl/lib/wiki/ as current directory.
16 WIKI=./ebin
17 PICO=../pico/ebin
18 STORE=$WIKI/../store
19 PORT=4999
20 ERL=/usr/local/bin/erl
22 export HEART_COMMAND="$WIKI/wiki.sh start"
24 case $1 in
25 start)
26 ${ERL} -boot start_sasl -sname wiki001 -pa ${WIKI} -pa ${PICO} \
27 -s wiki start ${PORT} ${STORE} -heart -detached
28 echo "Starting Wiki"
31 debug)
32 # if a second parameter is given, give it to -sname option
33 ${ERL} ${2:+-sname $2} -pa ${WIKI} -pa ${PICO} -s wiki start ${PORT} ${STORE}
36 stop)
37 ${ERL} -noshell -sname wiki_stopper -pa ${WIKI} -pa ${PICO} \
38 -s wiki stop wiki001@`hostname`
39 echo "Stopping wiki"
43 echo "Usage: $0 {start|stop|debug}"
44 exit 1
45 esac
47 exit 0