2024-02-09, 12:26 AM
Hi Team,
I turnoff my NAS overnight and in the morning sometimes Jellyfin doesnt run. I've trying to get a scheudled task going. I found one in another reddit for plex which is below. Any one have any ideas on home to edit. I've have changed all the plex references to jellyfin and asked for it to send an email when it goes wrong but hopefully someone here can have a look please.
#!/bin/bashecho Checking if plex is running...#if /usr/syno/bin/synopkg is_onoff "Plex Media Server" > /dev/nullif echo > /dev/tcp/127.0.0.1/32400 > /dev/nullthenecho Plex is running.exit 0elseecho Plex is not running. Will attempt to start it.echoecho --------------------Last 20 log entries--------------------tail -20 /volume1/PlexMediaServer/AppData/Plex\ Media\ Server/Logs/Plex\ Media\ Server.logecho --------------------End of log--------------------echo/usr/syno/bin/synopkg stop "PlexMediaServer"sleep 5/usr/syno/bin/synopkg start "PlexMediaServer"exit 1fi
I turnoff my NAS overnight and in the morning sometimes Jellyfin doesnt run. I've trying to get a scheudled task going. I found one in another reddit for plex which is below. Any one have any ideas on home to edit. I've have changed all the plex references to jellyfin and asked for it to send an email when it goes wrong but hopefully someone here can have a look please.
#!/bin/bashecho Checking if plex is running...#if /usr/syno/bin/synopkg is_onoff "Plex Media Server" > /dev/nullif echo > /dev/tcp/127.0.0.1/32400 > /dev/nullthenecho Plex is running.exit 0elseecho Plex is not running. Will attempt to start it.echoecho --------------------Last 20 log entries--------------------tail -20 /volume1/PlexMediaServer/AppData/Plex\ Media\ Server/Logs/Plex\ Media\ Server.logecho --------------------End of log--------------------echo/usr/syno/bin/synopkg stop "PlexMediaServer"sleep 5/usr/syno/bin/synopkg start "PlexMediaServer"exit 1fi