1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Shell scripting and tmux

Discussion in 'Computers, Games, Electronics etc' started by DarkHand, Jul 8, 2013.

  1. DarkHand

    DarkHand Senior Member VIP

    Messages:
    5,117
    Likes Received:
    241
    Joined:
    Sep 30, 2002
    Location:
    Chicago, IL
    So I've only just discovered tmux and am using it to manage the Minecraft server now... Right now I have a shell on the left side, and htop split with the mc server console on the right:

    [​IMG]

    The server console is just a screen session that I'm attached to... The server goes up and down when I work on or restart the server, and right now I'm having to constantly move over to the console window and restart the screen session manually. What I'd like to do is come up with a shell script that will actively watch for a certain-named screen session and attach to it whenever it becomes active. How the heck can I do that? I'm thinking along the lines of a Do While loop but I'm not sure how to go about it... Any ideas?
     

    Attached Files:

    • tmux.png
      tmux.png
      File size:
      103.6 KB
      Views:
      333
    Last edited: Jul 8, 2013
Verification:
Draft saved Draft deleted

Share This Page