tuned: move daemonize after init() before run()
This commit is contained in:
parent
47829cd592
commit
32d00cb4be
1 changed files with 5 additions and 4 deletions
9
tuned
9
tuned
|
|
@ -71,18 +71,19 @@ if __name__ == "__main__":
|
|||
elif opt in ['-c', "--config"]:
|
||||
cfgfile = val
|
||||
|
||||
if daemon:
|
||||
daemonize()
|
||||
|
||||
TUNEDDIR="/usr/share/tuned"
|
||||
if not TUNEDDIR in sys.path:
|
||||
sys.path.append(TUNEDDIR)
|
||||
|
||||
from tuned import tuned
|
||||
|
||||
tuned.init(TUNEDDIR, cfgfile)
|
||||
|
||||
if daemon:
|
||||
daemonize()
|
||||
|
||||
atexit.register(tuned.cleanup)
|
||||
signal.signal(signal.SIGTERM, handler)
|
||||
|
||||
tuned.init(TUNEDDIR, cfgfile)
|
||||
tuned.run()
|
||||
tuned.cleanup()
|
||||
|
|
|
|||
Loading…
Reference in a new issue