-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhub.sh
46 lines (39 loc) · 827 Bytes
/
hub.sh
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
#!/bin/bash
#---------------------+
# Commandline parsing |
#---------------------+
# start: Starts the service
# stop: Stops the service
# restart: Restarts the service (if not running, starts the service)
# console: Opens the console
# info: Tells user some information about connections and server usage
# backup: Runs a backup for worlds in $WORLD_DIR
# run: Executes a server command
# say: Sends a server alert
#---------------------+
mc_start() {
sh hub_1.sh start
sh hub_2.sh start
sh hub_3.sh start
}
mc_stop() {
sh hub_1.sh stop
sh hub_2.sh stop
sh hub_3.sh stop
}
case $1 in
start)
mc_start
;;
stop)
mc_stop
;;
restart)
mc_stop
mc_start
;;
*)
echo "Usage: server {start|stop|restart}"
;;
esac
exit 1