Coder Social home page Coder Social logo

Screen/tmux is not needed about mcscripts HOT 6 CLOSED

tapewerm avatar tapewerm commented on June 19, 2024
Screen/tmux is not needed

from mcscripts.

Comments (6)

TapeWerm avatar TapeWerm commented on June 19, 2024

Interesting, I will try that later. That could get rid of server_do(). The jank that is server_read() would live on albeit scraping journalctl instead of tmux. I wonder if journalctl can automatically parse the join/leave messages and push to the IRC bot and any future web hooks I've considered adding (likely just a line of wget). That would make the jank that is MCBElog.sh unneeded with up to 1 minute less delay as it would read on push instead of scraping once a minute. Only possible downside is while tmux confuses people having to use journalctl to see the output of a command echo'd to the pipe is also going to confuse some users.

Edit: I'm definitely putting the instance name in the description later. That was an oversight of mine, thank you.

from mcscripts.

TapeWerm avatar TapeWerm commented on June 19, 2024

I addressed the description lacking instance name, I'll play with a separate branch trying systemd sockets later this weekend. Gotta apply for classes, read backup logs, and other stuff first.

from mcscripts.

TapeWerm avatar TapeWerm commented on June 19, 2024

Branch werm_socket has some progress on scraping logs the same way I use tmux capture-pane. I'll work on it more tonight probably.
Edit: Most probable result of this is I drop tmux from the server and drop support for tmux sessions entirely. For now the IRC bot will stay in a tmux session.

from mcscripts.

TapeWerm avatar TapeWerm commented on June 19, 2024

I'm having a lot of trouble getting input logged the way tmux did. I just want standard in to be logged in the journal but I haven't found anything in systemd or Bash for that.
Edit: I'm gonna have to hold off on this, just spent a few hours and made zero progress. Got other things that need to be done before tomorrow morning, unless someone finds out how to take standard in and put that in the journal or in standard output which does go to the journal.
Edit 2: ExecStart=/bin/bash -c 'tee | LD_LIBRARY_PATH=. ./bedrock_server' does not output the input in journalctl.
Edit 3: Alt plan could be the reason I need stdin in logs is I scrape journalctl and use what I put in stdin as a cutoff point for parsing it. I could use journalctl timestamps and parse those and compare dates to find such. Honestly might be a better system but would need a big rewrite to the backup scripts.
Edit 4: I fixed the backup script with a major refactor, testing and an update should be out soon.

from mcscripts.

TapeWerm avatar TapeWerm commented on June 19, 2024

Latest 2 commits fix this issue. My services and scripts now use systemd sockets and journalctl. I may readd tmux compatibility later but that is irrelevant to this issue, the services will continue to use systemd sockets.

from mcscripts.

lzap avatar lzap commented on June 19, 2024

Wow that was fast, sorry I had bunch of github notifications to read through. This is cool.

# Thanks for sockets Lukáš Zapletal

This is not really necessary, it only pollutes such a nice and clean (tmux-free) config file now :-)

I am planning an article for opensource.com about SELinux policy and this repo will be totally featured as the recommended way! Kudos.

from mcscripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.