[installation] Init with inital config for global
This commit is contained in:
22
etc/init/v4l2caps.py
Normal file
22
etc/init/v4l2caps.py
Normal file
@ -0,0 +1,22 @@
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import os
|
||||
import seiscomp.kernel
|
||||
|
||||
|
||||
class Module(seiscomp.kernel.Module):
|
||||
def __init__(self, env):
|
||||
seiscomp.kernel.Module.__init__(self, env, env.moduleName(__file__))
|
||||
|
||||
def _get_start_params(self):
|
||||
params = " --config " + \
|
||||
os.environ['SEISCOMP_ROOT'] + "/etc/v4l2caps.cfg"
|
||||
# print params
|
||||
return params
|
||||
|
||||
def _run(self):
|
||||
prog = "run_with_lock"
|
||||
params = self.env.lockFile(self.name)
|
||||
params += " " + os.path.join(self.env.root, "bin", "v4l2caps") + \
|
||||
self._get_start_params()
|
||||
return self.env.start(self.name, prog, params, True)
|
||||
Reference in New Issue
Block a user