Skip to content

Commit

Permalink
I tried to start the ajenti-panel command using the --daemon option b…
Browse files Browse the repository at this point in the history
…ut it did not work. I added this option that was described in the help output. I also added the existing --start option to the ajenti-panel help output.
  • Loading branch information
xoro committed Jan 12, 2017
1 parent bdab2be commit b0a3708
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions ajenti-panel
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ def usage():
print("""
Usage: %s [options]
Options:
-c, --config <file> - Use given config file instead of default
-v - Debug/verbose logging
-d, --daemon - Run in background (daemon mode)
-h, --help - This help
--set-platform <id> - Override OS detection
-c, --config <file> - Use given config file instead of default
-v - Debug/verbose logging
-d, --daemon, --start - Run in background (daemon mode)
-h, --help - This help
--set-platform <id> - Override OS detection
""")


Expand All @@ -65,7 +65,7 @@ if __name__ == '__main__':
config_file = ''

try:
opts, args = getopt.getopt(sys.argv[1:], 'hc:dv', ['help', 'config=', 'daemon', 'set-platform='])
opts, args = getopt.getopt(sys.argv[1:], 'hc:dv', ['help', 'config=', 'daemon', 'start', 'set-platform='])
except getopt.GetoptError as e:
print(str(e))
usage()
Expand All @@ -82,7 +82,7 @@ if __name__ == '__main__':
ajenti.debug = True
elif o in ('-c', '--config'):
config_file = a
elif o in ('-d', '--start'):
elif o in ('-d', '--daemon', '--start'):
is_daemon = True
elif o == '--set-platform':
ajenti.platform = a
Expand Down Expand Up @@ -136,4 +136,3 @@ if __name__ == '__main__':
except Exception as e:
from ajenti import core
core.handle_crash(e)

0 comments on commit b0a3708

Please sign in to comment.