mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-09 22:37:55 +00:00
73e8df12cf
Also using the new autoconf
37 lines
526 B
Bash
Executable File
37 lines
526 B
Bash
Executable File
#!/bin/bash
|
|
|
|
RPCUSER='user'
|
|
RPCPASSWORD='pwd'
|
|
RPCALLOWIP='127.0.0.1'
|
|
|
|
BIN=$TWISTER_CORE_PATH/twisterd
|
|
|
|
CONFFILE="$TWISTER_HOME/twister.conf"
|
|
|
|
OPTS="-daemon -debug"
|
|
if [ ! -f "$CONFFILE" ]; then
|
|
OPTS='$OPTS -pid=$PIDFILE -rpcuser=$RPCUSER -rpcpassword=$RPCPASSWORD -rpcallowip=$RPCALLOWIP'
|
|
fi
|
|
|
|
|
|
function usage {
|
|
echo "Usage : $(basename $0) start|stop"
|
|
echo
|
|
exit
|
|
}
|
|
|
|
if [ $# -lt 1 ]
|
|
then
|
|
usage $@
|
|
fi
|
|
|
|
case "$1" in
|
|
start) $BIN $OPTS
|
|
echo
|
|
;;
|
|
stop) $BIN stop
|
|
;;
|
|
*) echo "Invalid option: $1"
|
|
usage $@
|
|
;;
|
|
esac |