Good to know about the main proc. I wasn't aware. And it is indeed set to auto restart. I just hadn't realized the stop alone would trigger that. I had figured I would need to take the additional step.
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 π)
Yeah. I see this as being a problem. I was curious how it comes into play.
The popularity of a show really needs to be taken into account.
Yeah. I see this as being a problem. I was curious how it comes into play.
The popularity of a show really needs to be taken into account.
Well,RCON has not fared well. Afaik, I've set things up correctly but the client I'm using (mcrcon) keep returning Error 111: Connection refused
.
- This post got me to direct things to the right IP which I could get with
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mcbe-world
. - docker port mcbe-world shows that the rcon port is open
- the server.properties files for the mc server has the relevant rcon lines
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
Ooh. I was not aware of the RCON protocol. Looking into now. This may be the exact thing I need. Thanks for the lead.
docker exec mcbe-world
just gives access to the container so commands can be executed. /stop
is a specific command for the MC server running in that container. The process is already running and I am trying to figure out how to issue a command to it... and the other comment in this post referencing "rcon" might be a solution...
Note: Still trying to navigate communities here on Lemmy to replace those from Reddit. If there is a better place such a question, I would welcome the suggestion.
I'm running a Synology NAS, which uses some flavor of Linux distribution. From there, among everything else running, I have a docker container hosting a Minecraft Bedrock Server. The MCBE server is great for fun, but not so great for resource usage. To handle this, most folks setup something to schedule the server to restart.
Within Synology, there is a task scheduler where I can run a user-defined script to restart the whole container:
docker restart mcbe-world
This works, but it's a dirty reboot though. I worried about corrupting the world (which I do regularly backup). From within the Minecraft server terminal, the /stop
command will gracefully shut it down.
I can't update the container with another application, like screen, because each MCBE update means replacing the entire container (and so destroying the changes). I am looking to somehow redirect a command to the server if possible.
Using docker exec -it mcbe-world
, I can execute what I want within the container.
The person here said, one can "inject commands by running the command as the appropriate account and redirecting it into the server" and they gave the example sudo su -s /bin/bash -c "echo say foobar > /run/service@name"
Unfortunately, this isn't so clear and straight forward to me.
Would anyone here be able to articulate this more clearly for me or have an idea as to how I might issue that /stop command from the Synology scheduled script BEFORE restarting the container?
Thanks!
UPDATE: Solution here: https://beehaw.org/comment/1088961
itβs a ridiculous loophole. They are literally saying, βI have this thing thatβs so valuable, but I βaccidentallyβ threw it away, itβs worthless now, I need to mark this down as a loss.β They are destroying their own products for tax purposes.
This. β
If this is accurate, then it would make a hell of a lot more sense. But... it sounds like these "residuals" need to be payed out differently because this sucks for consumers and... honestly... I think for those that poured themselves into making the content in the first place.
But imagine Willow to be entirely Disney. I imagine the tax benefit of cutting it is the best answer to my question, but hell... gah
Please no. Even after ripping all my music, I still have a one foot thick ream of CDs that I wish I could part with but my partner would murder me over.
And this is so true. Both the ripping your own content and then the DRM implications of it all. And all so frustrating.
And here I just want to buy things. And keep them. In my preferred format. Forever. The end.
Yes, this is what I was thinking was the matter. And someone else in this thread posted at a guardian link saying something to the same effect. It's still mind-boggling to me that to save money the answer is to remove everything completely. It feels like these big production companies are failing people and their use of the tax system is furthering that so they can save money. It just seems strange that they have to axe a show from existence to be able to prove it as a loss to the government.
Hot garbage they spent a whole lot of money on that could still be served without ever showing on the main title screens. They clearly had to have made a determination that the show would cost them more to keep it available, even though it doesn't entirely make sense to me how that all works.
This makes more sense if true.
This is what I had heard at some point. It's a tax thing. Even though there are no details, it makes more sense to me now. Reduced value == less taxes. Would love to hear the guts if this... but also at the same time pulling out hair. So much blood, sweat, and tears going into producing something only having it then wiped from existence. smh.
And I hadn't realized that Westworld was axed too. For a show that made such a huge hubbub and then to remove it entirely?! Ugh
Not physical media again. Haha. We got rid of all our DVDs to trim down on all the...stuff. No more stuffffff.
But it's that or someone hosts it, which costs money and circle around again...
Including Willow, which only finished airing in January.
Would you all explain to me how removing content we expect to have access to is a "cost savings" measure?
The following is from the Willow Wikipedia page, which led me to the linked URL: > The series was removed from Disney+ on May 26, 2023, amidst a Disney+ and Hulu content removal purge as part of a broader cost cutting initiative under Disney CEO Bob Iger.
I've been abroad for a month and earned some time off afterwards. One of my kids reminded me that we never finished Willow, so I said "let's do it now!" The show wasn't perfect for many reasons, but I wanted to finish it for nostalgia's sake and my child legit found it interesting. Lo and behold, the series isn't on Disney+ any more!
A quick search later, I see the above referenced quote linking to the article associated with this post... which only made things worse. The Mysterious Benedict Society was something my whole family could watch and enjoy without arguments! Turner and Hooch was dorky, but something my youngest loved and it was a super safe and easy pick for us bond over.
This post isn't about whether the shows are good. And it isn't about how nearly every show I like ends up cancelled. The point is that I paid for access, they were then quietly removed (for various platforms), and I have zero understanding as to how this saves these companies money.
Would someone explain?
P. S. Yes, I know this is old news. However, this is just how I am. I'm not up to date with anything in the entertainment world. I intentionally wait a few seasons for things because I loath when shows are cancelled after a season. (I'm looking at you, Firefly.) I'm the same way with books, often waiting to read a trilogy after its published because I don't like the wait in between books. (Thanks, Rothfuss).
I just don't take cancellation wells, especially when I was on top of everything including summer podcasts and such. (Now anything with the names Abrams, Lindelof, or Cuse makes my skin crawl.)
I know. I'm weird and stuff.
A Montana judge has sided with young environmental activists who said state agencies were violating their constitutional right to a clean and healthful environment by permitting fossil fuel development without considering its effect on the climate.
Am I wrong in feeling some hope in this (at least concering US law and the huge effect the country has on the climate as a whole)? It feels like this is... actually something?
Ukrainian sea drones have attacked a major Russian port on the Black Sea, damaging a naval ship. That's according to a Ukrainian official who spoke on condition of anonymity.
Thomas Edison's pioneering incandescent light bulb, which cast illumination by heating a filament until it glowed, is fading into history.
Teams dedicated to ocean restoration are urgently moving samples to tanks on land as a marine heat wave devastates entire reefs.
The extreme heat has devastated corals.This is a truly heartbreaking read:
βThe coral didnβt even have a chance to bleach, it just died. It just felt like, βOh my God, weβre in the apocalypse.β Whatβs happening?β
A farm in Bavaria is covering its hops with solar panels, providing electricity to 250 households and shading the plants from the increasingly scorching summer heat in the process.
A farm in Bavaria is covering its hops with solar panels, providing electricity to 250 households and shading the plants from the increasingly scorching summer heat in the process.
> A judge has now clarified that this is basically a legal distinction without a real-world difference. He says that what the jury found Trump did was in fact rape, as commonly understood.
> Kaplan also flatly rejected the Trump teamβs suggestion that the conduct Trump was found liable for might have been as limited as groping of the breasts. > > The reason? Trump was not accused of that, so the only alleged offense that would have qualified as βsexual abuseβ was forced digital penetration. Beyond that, Trump was accused of putting his mouth on Carrollβs mouth and pulling down her tights, which Kaplan noted were not treated as alleged sexual abuse at trial. > > βThe juryβs finding of sexual abuse therefore necessarily implies that it found that Mr. Trump forcibly penetrated her vagina,β Kaplan wrote, calling it the βonly remaining conclusion.β
How are you all managing the varmints in your yard? I've lived in a lot of places in my life and it seems I've found quite the mole and vole hotbed also known as my yard. sighs
My dog is able to catch them, but not without digging up tunnels, grass, and making a mess. My neighbor inserts "worms" (poison) into the tunnels, but I don't do that because of our dog.
I wish I could lay a yellow brick road for them to follow to a happier place, but they don't seem to be the type to understand. I don't actually want to harm any critters and thus the inner turmoil of humankind vs nature. I really don't like this post and I'm the one who wrote it.
I have been using various filters like "reddit", "threads", and "titan". My goodness, it transforms the Lemmy experience!
And the ability to hide posts. Thank you thank you thank you thank you!
Throw in Lemmy's community blocking...
I'm so glad to be able to create and prune within Connect. ππ
> At one precise moment this weekend, nearly all of the 8 billion people on Earth will be able to see sunlight in the sky, the counterpart to the "moment of darkness" that unfolds in December.
A climate activist in New Zealand faces 10 years in jail after a court found her guilty of forgery for sending a fake letter to the speakers at an oil industry conference, telling them it had been postponed due to the climate crisis.
>Rosemary Penwarden, [a 64 year old] climate activist in New Zealand, faces more than 10 years in jall for a fake letter canceling an oil conference.
>Three years later, after a trial in the Dunedin District Court, Penwarden was found guilty on Wednesday of two charges of creating and using a forged document. > >βIt was a surprise,β she said. βIβm reminded of the topsy-turvy world weβre in. It should not be the grandmothers on trial, it should be the oil industry, it should be those people who are making massive profits off the destruction of all of our futures.β
Binged the first five episodes last weekend and the sixth just now (Prime). It's a crime drama interwoven with comedy.
It's definetly vulgar, often tiresomely so, with one of the characters. Tonight though, I saw a very human side of her that was really tender and lovely... despite the vulgarity. π
On the other hand, Kate Box plays a detective that simply continues to draw me in further with each episode. I want to watch her work. I can feel the reasons why she is who she is. I can see what drives her. I see her brokenness and also what makes her great. I want to know her. I admire her. Tonight, I could truly empathize with her in ways that I haven't been able to with others folks for a long time. I love good story telling like this. π
Anyway, it's been worth the watch and I look forward to finishing it out.
What do you all think?
I'm new to Lemmy and have been searching the federated communities for those which I wanted to subscribe to. For some reason, this community's name renders weird on my instances search as well as the app I'm using (see image).
Is "Fantasy books, stories, &c" correct? And if so, what does "&c" stand for?