SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Linux

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-19-2019, 02:45 PM
hvymetal hvymetal is offline
Sage User
 
Join Date: Nov 2007
Posts: 46
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
Backup Script
Code:
cd /mnt/user/appdata/sagetv/server
zip ./backups/SageTVBackup-`date +%Y%m%d-%s`.zip Wiz.bin Sage.properties sagetv_*.txt
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -6. The time now is 02:07 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.