1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
runvdr extreme
Written by: Udo Richter <udo_richter(a)gmx.de>
Project's homepage: http://www.udo-richter.de/vdr/scripts.en.html#runvdr
See the file COPYING for license information.
About
--------------------------------------------------------------------------
runvdr extreme is a runvdr script, just like the runvdr script included in
the VDR distribution. Its just roughly 17 times bigger.
Some of the features of runvdr extreme:
- Loads default configuration from runvdr.conf
- All configuration accessible and overrideable from command line
- All VDR options handled
- Handles runvdr.pid file, acts on signals
- Restarts VDR in case of errors
- Commands to restart VDR and reload DVB
- Configuration file re-read on VDR restart
- Avoids endless loops if VDR crashes instantly
- Resets terminal to defaults after VDR terminated
- Add wrapper commands to VDR for debugging
- Waiting for the VDR process to be killed completey,
hard killing after timeout
- Command line help
- Can switch console terminal
- Can set locale for VDR daemon
- Optionally supports pluginsetup-plugin
Quick-start
--------------------------------------------------------------------------
- Copy runvdr to /usr/local/bin/ or whereever you like
- Copy runvdr.conf.example to /etc/runvdr.conf if you want to run VDR as
server, or ~/.runvdr.conf if you want to run it as user.
- Edit the runvdr.conf to match your needs
The runvdr.conf is pretty much self-explaining. All runvdr.conf options are
also available on command line, see --help.
Details
--------------------------------------------------------------------------
Options take this precedence:
1. Command line options have highest precedence
2. runvdr.conf file specified by -C or --runvdr-conf
3. If no -C and no --runvdr-conf specified, use ~/.runvdr.conf
4. If no -C and no --runvdr-conf and no ~/.runvdr.conf, use /etc/runvdr.conf
5. If none of the above, runvdr built-in defaults are used.
Only one of the runvdr.conf files is loaded by default, and only one -C
option is evaluated. However, you can load the contents of another runvdr.conf
file from a runvdr.conf by using the INCLUDE directive. For example, you can
load /etc/runvdr.conf from within ~/.runvdr.conf to just override some of
the settings for the current user.
Plugins added by the AddPlugin directive in the conf file and the --plugin
and -P command line option can be removed again from the list of plugins
by specifying "AddPlugin -name", --plugin="-name" or -P-name.
The name part acts as a pattern to the beginning of the plugin name, all
plugins matching "name*" will be dropped. Especially "AddPlugin -" and -P- will
drop all plugins from the list. The same mechanism works for the -D device
parameter.
To pass parameters to VDR without parsing by runvdr, use -- as paramenter.
All parameters after -- will be directly passed to VDR. For erxample,
"runvdr -- --help" will show the command line help of VDR instead of runvdr.
Dependencies
--------------------------------------------------------------------------
Unix commands, that runvdr uses:
Command Debian packet
pgrep procps
ps procps
kill procps
sleep coreutils
date coreutils
chvt console-tools
getopt util-linux
setterm util-linux
Examples
--------------------------------------------------------------------------
Assuming you've set up your defaults in /etc/runvdr.conf, here are some
cool things you can do now:
Start VDR in background (for example with TERMINAL=/dev/tty8 in conf file):
runvdr &
Stop VDR and the runvdr script:
runvdr --terminate
Dito, but wait until VDR is killed:
runvdr --terminate --wait
Restart the already running VDR process because it is hanging, or because
the runvdr.conf has changed:
runvdr --restart
Dito, but also reload the DVB drivers:
runvdr --dvb-restart
Use the new fresh compiled VDR for the first time:
runvdr --vdr=/usr/src/vdr-1.5.0/vdr --lib=/usr/src/vdr-1.5.0/PLUGINS/lib
For debugging, start VDR with no terminal redirection:
runvdr --terminal="" --switchterminal=""
Load all plugins and also the hello plugin:
runvdr -P hello
Load only the hello plugin:
runvdr -P- -P hello
Load all plugins, but not the hello-plugin:
runvdr -P-hello
Do a dry-run of runvdr:
runvdr --wrapper=echo
Do a debugging session:
runvdr --wrapper="gdb --args"
Start with a completely different setup:
runvdr --runvdr-conf="/etc/runvdr-debugging.conf"
|