-
Notifications
You must be signed in to change notification settings - Fork 0
/
start
34 lines (32 loc) · 1.1 KB
/
start
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
32
33
34
# copies the built plugin (run 'make (plugin)' first),
# combines the cfg files in server and starts the server
# dev configuration is used if the $BASDONDEV environment variable is set
pushd server > /dev/null
if [ -f "servercfg-rcon_password.cfg" ]
then
if [ -z "$BASDONDEV" ]
then
if cp ../fly-plugin/out/basdonfly-prod.so plugins/basdonfly.so &&
cat servercfg-common.cfg servercfg-rcon_password.cfg servercfg-prod-*.cfg > server.cfg
then
nohup bash serverloop &
fi
else
echo "RUNNING WITH DEV CONFIG"
if cp ../fly-plugin/out/basdonfly-dev.so plugins/basdonfly.so &&
cat servercfg-common.cfg servercfg-rcon_password.cfg servercfg-dev-*.cfg > server.cfg
then
if [ -f "mysql_log.txt" ]
then
initial_mysql_log_wc=$(wc -c mysql_log.txt)
fi
./samp03svr
[ -f "mysql_log.txt" ] && [ "$initial_mysql_log_wc" != "$(wc -c mysql_log.txt)" ] &&
echo "" && echo "" && echo "WARN: mysql_log.txt changed!"
fi
fi
else
echo "rcon_password changme" > servercfg-rcon_password.cfg
echo "Please change the rcon password in server/servercfg-rcon_password.cfg and run again"
fi
popd > /dev/null