Way to autoshutdown when clients offline

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
Elluminatus
Posts: 9
Joined: Sun May 07, 2017 6:12 pm

Way to autoshutdown when clients offline

Post by Elluminatus »

Hi,

can you help me to implement a autoshutdown script when a specific amount of clients is offline?

I am using dietpi 6.19.7 on a nativ pc system. When I do a "shutdown -now" the system goes down and with a wol it wakes up. Perfectly! I use this system as a LMS (Logitech Media Server) with 4 clients (picoreplayer with raspberry pis)

Now I need a skript to "shutdown -now" when non of the 4 clients is online.

Can you help me?

Greetings Elluminatus
User avatar
MichaIng
Site Admin
Posts: 2419
Joined: Sat Nov 18, 2017 6:21 pm

Re: Way to autoshutdown when clients offline

Post by MichaIng »

@Elluminatus
Interesting aim, makes sense for pure media server machine, besides you will face the boot delay when starting a client.

You could add a cron job to regularly check for active clients. However I am not sure how these can be checked. Perhaps there is a Plex CLI command to do this, or simply check active network connections for the related client IPs/hostnames in general?
Post Reply