initial commit of bin scripts into git

This commit is contained in:
2023-11-08 13:38:19 +11:00
commit 3735eea3c6
113 changed files with 11631 additions and 0 deletions

23
kill_mythfrontend_from_remote Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/tclsh
proc TouchFile {file} {
set f [open $file w]
puts $f " "
close $f
}
set file "/tmp/.kill_mythfrontend_from_remote"
if { [file exists $file] } {
set f_date [file mtime $file]
set now [clock seconds]
if { [expr $now - $f_date < 4] } {
catch {exec /usr/bin/pkill mythfrontend} ret
# ifpkill did not work, try kill -9
if { $ret != 0 } {
catch {exec /usr/bin/pkill -9 mythfrontend} ret
}
}
TouchFile $file
} else {
TouchFile $file
}