Skip to content

Instantly share code, notes, and snippets.

@vemacs
Last active January 31, 2020 19:21
Show Gist options
  • Save vemacs/8570210 to your computer and use it in GitHub Desktop.
Save vemacs/8570210 to your computer and use it in GitHub Desktop.
Simple guide for using wemux for BungeeCord

I really should script a wrapper or something over this, but it's so simple, there's no real point.

  1. Install wemux (install git if your distro doesn't have it):

     sudo apt-get install git tmux
     sudo git clone git://github.com/zolrath/wemux.git /usr/local/share/wemux
     sudo ln -s /usr/local/share/wemux/wemux /usr/local/bin/wemux
     sudo cp /usr/local/share/wemux/wemux.conf.example /usr/local/etc/wemux.conf
     sudo sed -i -e s/change_this/minecraft/g /usr/local/etc/wemux.conf
    
  2. Create a separate minecraft user if you care, and add their home dir to a group called mcadmin:

     sudo adduser minecraft
     sudo addgroup mcadmin
     sudo usermod -a -G mcadmin minecraft
     sudo usermod -a -G mcadmin <your normal user>
    
  3. You might want a script to quickly apply permissions if needed, stick the commands below in it:

     sudo chown -R minecraft ~minecraft
     sudo chgrp -R mcadmin ~minecraft
     sudo chmod -R g+w ~minecraft
    
  4. Set up BungeeCord in ~minecraft, aka /home/minecraft, create a startup script

  5. Create a wemux session: sudo -u minecraft wemux start

  6. Run chmod 1777 /tmp/wemux-wemux, then detach (Ctrl+B-d)

  7. Create a new window: wemux new-window -n bungee1

  8. cd to your BungeeCord dir and run the start script: wemux send-keys -t bungee1 cd bungee1; ./start.sh C-m

  9. Done

Run wemux attach to attach from any user and get an actual console, and send keys to the window via wemux send-keys -t bungee1 <your command> C-m. Tada, simple 2-minute BungeeCord wrapper setup.

E.g. to restart the proxy running under bungee1, run wemux send-keys -t bungee1 end C-m ./start.sh C-m

(C-m is the {Enter} key.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment