def daemon():

    euid = os.geteuid()
    if euid != 0:
        print "Script not started as root. Running sudo.."
        args = ['sudo', sys.executable] + sys.argv + [os.environ]
        # the next line replaces the currently-running process with the sudo
        os.execlpe('sudo', *args)

    print 'Running. Your euid is', euid
    daemonize(VNFManagerAdapter)
def daemon():

    euid = os.geteuid()
    if euid != 0:
        print "Script not started as root. Running sudo.."
        args = ['sudo', sys.executable] + sys.argv + [os.environ]
        # the next line replaces the currently-running process with the sudo
        os.execlpe('sudo', *args)

    print 'Running. Your euid is', euid
    daemonize(VNFManagerAdapter)
示例#3
0
def daemon():
    daemonize(Pasta)
示例#4
0
def daemon():
    daemonize(Pasta)
示例#5
0
def daemon():
    daemonize(ExampleScaling)
示例#6
0
def daemon():
    daemonize(Specification)
示例#7
0
def daemon():
    daemonize(Storage)