Update daemon_uid_gid.py
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
from os import getuid, geteuid, getgid, getegid
|
from os import getuid, geteuid, getgid, getegid, path
|
||||||
from sys import argv
|
from sys import argv
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ def main():
|
|||||||
f.write(" ".join(map(str, uids + gids)))
|
f.write(" ".join(map(str, uids + gids)))
|
||||||
|
|
||||||
|
|
||||||
group = "nogroup" if os.path.exists("/etc/debian_version") else "nobody"
|
group = "nogroup" if path.exists("/etc/debian_version") else "nobody"
|
||||||
|
|
||||||
daemon = Daemonize(app="test_app", pid=pid, action=main, user="nobody", group=group)
|
daemon = Daemonize(app="test_app", pid=pid, action=main, user="nobody", group=group)
|
||||||
daemon.start()
|
daemon.start()
|
||||||
|
|||||||
Reference in New Issue
Block a user