git-svn-id: file:///root/webif/svn/pkg/webif/trunk@2258 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg
2015-01-28 00:08:09 +00:00
parent 38fdd3aaa6
commit 35ed1a5db5
7 changed files with 44 additions and 4 deletions

24
etc/recmon.d/webiflog Executable file
View File

@@ -0,0 +1,24 @@
#!/mod/bin/jimsh
source /mod/webif/lib/setup
require ts.class system.class
set file [lindex $argv 0]
set ts [ts fetch "$file.ts"]
set root [system mediaroot]
set dir [file dirname $file]
if {[string match "$root*" $dir]} {
set dir [string range $dir $([string length $root] + 1) end]
}
set ch [$ts get channel_name]
set dur [$ts duration]
set title [$ts get title]
set msg "Recorded: $dir/$title ($dur minutes - $ch)"
set logfd [open "/mod/tmp/record.log" "a+"]
puts $logfd "[\
clock format [clock seconds] -format "%d/%m/%Y %H:%M"\
] - $msg"
$logfd close