Add script to background a server launch
This commit is contained in:
parent
2b95291f93
commit
2b426cb784
26
script/dev_server_WIP
Executable file
26
script/dev_server_WIP
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# script/local_server: Launch a local dev version of the server
|
||||||
|
|
||||||
|
source "$(dirname "${0}")"/../script/include/global_header.inc.sh
|
||||||
|
|
||||||
|
# Create a function to trap signals with
|
||||||
|
reap() {
|
||||||
|
kill -TERM "${child}"
|
||||||
|
sleep 0.1
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
trap reap TERM INT
|
||||||
|
|
||||||
|
# Set server launch related environment variables
|
||||||
|
DEBUG=1
|
||||||
|
LAUNCH_ARGS="$*"
|
||||||
|
|
||||||
|
# Launch the app
|
||||||
|
source ./script/server
|
||||||
|
|
||||||
|
# Capture the PID of the child process
|
||||||
|
child=$!
|
||||||
|
|
||||||
|
wait $child
|
Loading…
x
Reference in New Issue
Block a user