1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/usr/bin/python
import sys, os
if os.path.dirname(os.path.abspath(sys.argv[0])) == os.path.abspath("scripts"):
sys.path.insert(0, "./")
else:
from landscape.lib.warning import hide_warnings
hide_warnings()
from landscape.lib.fd import clean_fds
# close stray file descriptors now, before we give any other code the chance to
# create a critical FD. Even before the reactor is installed!
clean_fds()
# This is needed for DBUS listeners to work.
from landscape.reactor import install
install()
from landscape.watchdog import run
if __name__ == "__main__":
sys.exit(run())
|