mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2024-11-26 19:36:01 +03:00
36 lines
394 B
Bash
Executable file
36 lines
394 B
Bash
Executable file
set -e
|
|
|
|
launch_kv() {
|
|
bash -c "exec -a kv ./target/debug/kv-test-util $1"
|
|
}
|
|
|
|
kill_kv() {
|
|
kill -9 $(pidof kv)
|
|
}
|
|
|
|
help() {
|
|
cat << EOF
|
|
USAGE:
|
|
./network.sh
|
|
launch launches key-value server
|
|
kill kills key-value server
|
|
EOF
|
|
}
|
|
|
|
if [ -z $1 ]
|
|
then
|
|
help
|
|
elif [ $1 == 'launch' ]
|
|
then
|
|
if [ -z $2 ]
|
|
then
|
|
help
|
|
else
|
|
launch_kv $2
|
|
fi
|
|
elif [ $1 == 'kill' ]
|
|
then
|
|
kill_kv
|
|
else
|
|
help
|
|
fi
|