ⓝⓞ🅞🅝🅔

Let go and let entropy. ,🌌

  • 1 Post
  • 24 Comments
Joined 1 year ago
cake
Cake day: June 10th, 2023

help-circle

  • YEEEESSS!!! THIS!!! Thank you! I’ve been able to hobble together a script now that I have a Synology automated task calling early each morning after world backups are complete. I’m so very grateful to you all. I’ve learned a lot. A proper “stop” is being issues now which reduces the chance of world corruption which would make my family very very grumpy.

    Here’s the script just in case someone finds themselves in a similar situation as me. This is not my wheelhouse and it’s not pretty. I know it can be better, but I’ve spent too much time on this as it is and need to go fix a washing machine now. Ugh…


    #!/bin/bash
    
    # Define the countdown duration in seconds
    countdown_duration=20
    
    # Function to send a message to the Docker container
    send_cmd() {
      cmd="$1"
      sudo sh -c "echo '$cmd' | socat EXEC:'docker attach mcbe-world',pty STDIN"
    }
    
    # Announce
    announce_text="Daily server restart commencing in $countdown_duration seconds..."
    send_cmd "say $announce_text"
    
    # Perform the countdown
    for ((i = $countdown_duration; i >= 1; i--)); do
      #echo "Restaring in $i seconds"
      countdown_text="Restarting in $i seconds"
      send_cmd "say $countdown_text"
      sleep 1
    done
    
    # Gracefully shutdown server
    #  Note: stopping forces the mcbe container to restart on it's own. 
    #  Not sure why that's the case, but it's the end result I want...
    send_cmd "stop"
    

    P.S. I really need to figure out how to get the RCON solution working because that would be a more elegant way to handle things.

    P.P.S Example run (yes, the timing and spelling were updated after this screenshot 😁)



  • This looked so promising.

    Via SSH, I can indeed use docker attach and from within I can issue a stop for MC server. Works fine.

    However, the Synology task scheduler via DSM doesn’t seem to be able to similarly attach and then issue the stop command. I get this back via email (for when a scheduled task fails):

    Task Scheduler has completed a scheduled task.

    Task: MC Graceful Restart Start time: Tue, 29 Aug 2023 17:19:41 -0500 Stop time: Tue, 29 Aug 2023 17:19:42 -0500 Current status: 127 (Interrupted) Standard output/error:

    the input device is not a TTY /bin/bash: line 1: stop: command not found







  • This of course presumes that you have a Synology disk station. They come in a variety of different models.

    I’m surprised at how much I’m able to serve from my device. I use it for cloud storage, file thinking across devices, photo management and backup across devices, ebook management, running a game server for my family, running an evernote-like service, etc etc.

    It’s been really good to have full control over all my information and not have to pay ever increasing fees to various companies for various services.





  • if they can’t connect for a bit, that’s fine, they can work on the local files and sync up next time I’m back on the home network.

    I suppose this is what I’m most concerned about. I currently use a similar situation for my password manager database. We have Windows and Android clients that connect to a shared database file and I feel like I’m constantly having to manually synchronize the file because it remains open so long on each client. I’d like to avoid this situation.

    Joplin can sync using files on the device filesystem

    This weekend, I’m going to attempt to get it running on my NAS and do this.

    I may also try the other syncing via cloud at the same time just to test.


  • Your experience is what i am looking to accomplish. I’d like to transfer everything Evernote to a self-hosted FOSS application I can serve on my Synology NAS. I would access my notes primarily on my phone (Android) and sometimes Windows. AFIAK, Joplin would sync to my Synology NAS where it’s hosted… so I’m a little perturbed by the additional used of Syncthing.

    Would someone explain the need/desire for Joplin+Syncthing?



  • Did any of you guys try it as well? What’s your opinion?

    In respect to Lemmy as a whole, I’m trying to exercise a lot patience.

    One of the first things I did was install it as a PWA. It has a sleek UI, but some bugs makes it incredibly hard for me to use. One of the worst is an issue with several of the combo boxes which repeatedly flashing on use. I have to try hitting the appropriate selection multiple times in hopes of it eventually taking.

    I use Jerboa most of the time inspite of the many bugs, but I usually end up having to open the PWA for missing functionality.

    Like I said…

    Lots… And lots

    And lots… of patience.