Hello,
I wrote myself a small and simple start and stop script. I run a BungeeCord, a Creative and a Lobby Server. I would like to be able to start all with one start file (with screen) and stop all with another file (also with screen).
I have written the following:
The start script actually works now. But the following is displayed in the console:
./startall.sh
27976.bungeecord (09/03/2019 12:03:37 AM) (Attached)
27973.bungee cord (09/03/2019 12:03:37 AM) (Detached)
27948.cb1 (09/03/2019 12:03:32 AM) (Attached)
27944.cb1 (09/03/2019 12:03:32 AM) (Detached)
27919.lobby (09/03/2019 12:03:27 AM) (Attached)
27915.lobby (09/03/2019 12:03:27 AM) (Detached)
A little weird, too, isn't it?
And when Stopscript comes the following message:
root@ERT0077:/home# ./stopall.sh
-bash: ./stopall.sh: /bin/bash^M: bad interpreter: No such file or directory
./stopall.sh
What am I doing wrong?
I wrote myself a small and simple start and stop script. I run a BungeeCord, a Creative and a Lobby Server. I would like to be able to start all with one start file (with screen) and stop all with another file (also with screen).
I have written the following:
The start script actually works now. But the following is displayed in the console:
./startall.sh
screen -d -m -S lobby bash -c 'cd /home/network/lobby && ./start.sh'
echo "Der LobbyServer wird gerade gestartet..."
echo "Starte nächsten Server in 5 Sekunden..."
sleep 5
screen -d -m -S cb1 bash -c 'cd /home/network/cb1 && ./start.sh'
echo "Der Citybuild Server wird gerade gestartet..."
echo "Starte nächsten Server in 5 Sekunden..."
sleep 5
screen -d -m -S bungeecord bash -c 'cd /home/network/bungeecord && ./start.sh'
echo "Der BungeeCord startet und das Netzwerk ist gleich verfügbar..."
27976.bungeecord (09/03/2019 12:03:37 AM) (Attached)
27973.bungee cord (09/03/2019 12:03:37 AM) (Detached)
27948.cb1 (09/03/2019 12:03:32 AM) (Attached)
27944.cb1 (09/03/2019 12:03:32 AM) (Detached)
27919.lobby (09/03/2019 12:03:27 AM) (Attached)
27915.lobby (09/03/2019 12:03:27 AM) (Detached)
A little weird, too, isn't it?
And when Stopscript comes the following message:
root@ERT0077:/home# ./stopall.sh
-bash: ./stopall.sh: /bin/bash^M: bad interpreter: No such file or directory
./stopall.sh
#!/bin/bash
echo "Stop all"
screen -r lobby -p 0 -X stuff "stop^M"
sleep 5
screen -r cb1 -p 0 -X stuff "stop^M"
sleep 5
screen -r bungeecord -p 0 -X stuff "end^M"
echo "done"
What am I doing wrong?
