|
SageTV Linux Discussion related to the SageTV Media Center for Linux. Questions, issues, problems, suggestions, etc. relating to the SageTV Linux should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Stop All Client Script
My family kept falling asleep while watching live TV. Below is script that uses the SageTV webpage to stop all clients. I run it daily along with my backup script.
Stop All Clients Code:
#!/bin/bash USER=REPLACE_WITH_USER PASSWORD=REPLACE_WITH_PASSWORD SERVER=192.168.10.175:8080 SERVER_CMD='RetImage=yes&nocache=1550602016622&command=Stop&context=' PATH="/mnt/user/appdata/sagetv/server/clients/" EXT=".properties" #Replace @ with escape sequnece if password or username use @ USER=${USER//@/%40} PASSWORD=${PASSWORD//@/%40} SERVER="http://$USER:$PASSWORD@$SERVER/sage/SageCommand" #Find all possible clients from client .properties files FIND="$PATH*$EXT" shopt -s nullglob for f in $FIND do FULL_FILENAME=$f FILENAME=${FULL_FILENAME##*/} FILENAME=${FILENAME%%.*} CURL_CMD="/usr/bin/curl -d $SERVER_CMD$FILENAME $SERVER" $CURL_CMD done Code:
cd /mnt/user/appdata/sagetv/server zip ./backups/SageTVBackup-`date +%Y%m%d-%s`.zip Wiz.bin Sage.properties sagetv_*.txt |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
One Stop Shopping - Sage Client, Win 7 64bit, and HD-PVR? | Savage1701 | SageTV Software | 3 | 10-26-2010 01:53 PM |
Script/Program to STOP/RESUME Process | joe123 | SageTV Customizations | 2 | 03-10-2009 03:14 PM |
Anyone have a script tp restart client ? | brewston | SageTV Software | 3 | 09-16-2008 08:02 AM |
Stop Recording LiveTV From Client | band80 | SageTV Software | 4 | 01-15-2005 02:44 PM |
How do I start and stop sage via a DOS script? | perfessor101 | SageTV Software | 10 | 01-03-2005 10:39 AM |