-
Notifications
You must be signed in to change notification settings - Fork 11
/
-
56 lines (46 loc) · 1.01 KB
/
-
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
cd /root/oboro
PATH=./:$PATH
L_SRV=login-server_sql
C_SRV=char-server_sql
M_SRV=map-server_sql
print_start() {
# more << EOF
echo ""
echo " (c) 2003 Athena Project"
echo " [email protected]"
echo ""
#EOF
}
check_files() {
for i in ${L_SRV} ${C_SRV} ${M_SRV}
do
if [ ! -f ./$i ]; then
echo "$i [ERROR]encontrado."
echo "Procede a compilar."
exit 1;
fi
done
# more << EOF
echo "[LISTO] ningun error encontrado"
#EOF
}
case $1 in
'iniciar')
print_start
check_files
exec ./${L_SRV}&
exec ./${C_SRV}&
exec ./${M_SRV}&
echo "Iniciando"
;;
'parar')
ps ax | grep -E "${L_SRV}|${C_SRV}|${M_SRV}" | awk '{print $1}' | xargs kill
;;
'compilar')
chmod +x configure && ./configure --enable-64bit && make clean && make sql 2>&1 | tee -a /root/Desktop/Logs/compile-$DATE.log
;;
*)
echo "[ ISAACHJK ] ./- { iniciar | parar | compilar }"
;;
esac