mirror of
https://github.com/gryf/wicd.git
synced 2026-01-08 14:54:15 +01:00
Don't start the daemon if it's already running
This commit is contained in:
@@ -1764,6 +1764,11 @@ def main(argv):
|
|||||||
# quit, this should be the only option specified
|
# quit, this should be the only option specified
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
if os.path.exists(wpath.pidfile):
|
||||||
|
print 'It seems like the daemon is already running.'
|
||||||
|
print 'If it is not, please remove %s and try again.' % wpath.pidfile
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
if not os.path.exists(wpath.networks):
|
if not os.path.exists(wpath.networks):
|
||||||
os.makedirs(wpath.networks)
|
os.makedirs(wpath.networks)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user