EmperorOfTheMankind Posted December 19, 2015 Share Posted December 19, 2015 Hello everyone. Is there a way to shutdown all: master and slaves at once? Link to comment Share on other sites More sharing options...
mcumba Posted December 23, 2015 Share Posted December 23, 2015 I'll just leave this there, i'd love an answer to that too. Tho i dont know if you shutdown only overworld, will a cave player get disconnected? Link to comment Share on other sites More sharing options...
judas Posted December 28, 2015 Share Posted December 28, 2015 Make an alias in .bashrc or make an executable bash script with the three commands.Here is an example of a .bashrc alias, with 3 servers.Replace screen name DST01-03 with your screen name(s).shutdownservers() {screen -S DST01 -X stuff 'echo c_shutdown()'$(echo -ne '\015') &&screen -S DST02 -X stuff 'echo c_shutdown()'$(echo -ne '\015') &&screen -S DST03 -X stuff 'echo c_shutdown()'$(echo -ne '\015') }Example of a bash script.#!/bin/bashscreen -S DST01 -X stuff 'echo c_shutdown()'$(echo -ne '\015') &&screen -S DST02 -X stuff 'echo c_shutdown()'$(echo -ne '\015') &&screen -S DST03 -X stuff 'echo c_shutdown()'$(echo -ne '\015')Put it in a file and name it file.sh, and chmod +x file to make it able to run.Run it: ./file.sh Link to comment Share on other sites More sharing options...
EmperorOfTheMankind Posted January 4, 2016 Author Share Posted January 4, 2016 Make an alias in .bashrc or make an executable bash script with the three commands.Here is an example of a .bashrc alias, with 3 servers.Replace screen name DST01-03 with your screen name(s).shutdownservers() {screen -S DST01 -X stuff 'echo c_shutdown()'$(echo -ne '\015') &&screen -S DST02 -X stuff 'echo c_shutdown()'$(echo -ne '\015') &&screen -S DST03 -X stuff 'echo c_shutdown()'$(echo -ne '\015') }Example of a bash script.#!/bin/bashscreen -S DST01 -X stuff 'echo c_shutdown()'$(echo -ne '\015') &&screen -S DST02 -X stuff 'echo c_shutdown()'$(echo -ne '\015') &&screen -S DST03 -X stuff 'echo c_shutdown()'$(echo -ne '\015')Put it in a file and name it file.sh, and chmod +x file to make it able to run.Run it: ./file.shWait isn't that for Linux systems? I'm kinda new in this so it's hard for me to understand some things. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.