<s> from os import getuid , geteuid , getgid , getegid , path <EOL> from sys import argv <EOL> from time import sleep <EOL> from daemonize import Daemonize <EOL> pid = argv [ <NUM_LIT:1> ] <EOL> log = argv [ <NUM_LIT:2> ] <EOL> def main ( ) : <EOL> uids = getuid ( ) , geteuid ( ) <EOL> gids = getgid ( ) , getegid ( ) <EOL> with open ( log , "<STR_LIT:w>" ) as f : <EOL> f . write ( "<STR_LIT:U+0020>" . join ( map ( str , uids + gids ) ) ) <EOL> group = "<STR_LIT>" if path . exists ( "<STR_LIT>" ) else "<STR_LIT>" <EOL> daemon = Daemonize ( app = "<STR_LIT>" , pid = pid , action = main , user = "<STR_LIT>" , group = group ) <EOL> daemon . start ( ) </s>
