siegfried.pietralla at eds
Apr 10, 2007, 5:17 PM
Post #13 of 19
Re: how to disable the delete recording option ?
[In reply to]
From: mythtv-users-bounces [at] mythtv
[mailto:mythtv-users-bounces [at] mythtv] On Behalf Of Roo
Sent: Tuesday, 10 April 2007 18:46
To: Discussion about mythtv
Subject: Re: [mythtv-users] how to disable the delete recording option ?
On 10/04/07, F Peeters (MythTV) <francesco [at] fampeeters> wrote:
On Tue, April 10, 2007 09:30, Roo wrote:
> On 10/04/07, Pietralla, Siegfried P
<siegfried.pietralla [at] eds> wrote:
>> but how can you run a user job after a program has been
recorded ? ( so
>> that you can protect existing recordings and then also later
turn of the
>> 'chattr +i' e.g. the same way you can run comm. flagging and
>> against any already recorded file ).
> This is all from memory, so someone correct me if I am
> - Write the script/s to do the un/protect of the recordings
> - Define the user job/s in myth-setup that call the
> - Enable user jobs in myth-setup, don't think they are
enabled by default
> - Edit your recording schedule for the relevant shows to
> to run after recording is complete (in myth-web there is a
check box for
What the OP wants is to be able to en/disable the chattr +i from
*after* a show has already been recorded...
He already indicates he knows how to do this in the schedules...
So basically: Can he call the userjobs 1-4 from the GUI
than the recording schedules?..
PC-Chips M863G Geode - NVidia 440 - Hauppauge PVR250
Ubuntu 6.10 (Edgy Eft) - XFCE - MythTV 0.20 - Xine
Panasonic NV-VHD1 VCR/DVD player case modded to fit it all
mythtv-users mailing list
mythtv-users [at] mythtv
Sure, I guess I should have read what I was quoting a bit more carefully
If you have userjobs setup properly, you can also go into watch
recordings and hit "i" I think and then go into "Job Options" you can
then select the user configued jobs to run from here.
Check the doco to see what the macros are that can be used for passing
things like filename as an argument to the actual script being called.
you're right - it seems the 'job options' menu is dynamic, so when you
don't have any user jobs defined then they don't show up in the 'job
options' menu ( that's why i didn't see a way to run them ).
as far as setting up the job goes, you don't even need to create a
script. i just ran the following in the database ( i didn't find a front
end for creating user jobs - but i now see from the above response that
you can use 'mythtv-setup' -> 'general' ) :
update settings set data='sudo /usr/bin/chattr +i %DIR%/%FILE%' where
update settings set data='prevent deletion' where value='userjobdesc1';
update settings set data='1' where value='joballowuserjob1';
and of course a job to allow deletion :
update settings set data='sudo /usr/bin/chattr -i %DIR%/%FILE%' where
update settings set data='allow deletion' where value='userjobdesc2';
update settings set data='1' where value='joballowuserjob2';
note - it looks like you need special privileges to run 'chattr' as a
non-root user. i am running knoppmyth, so i added ',/usr/bin/chattr' to
the end of the 'mythtv' line in the file '/etc/sudoers'.
so now i'm done - i have a simple way to protect selected recordings
from deletion, and all done through the standard interface without the
need for any scripting or application changes. as a bonus, this also
protects me from stupid mistakes when using the command line.
thank you all.