pagekite: restart service when config is changed

so the changed config gets applied immediately, and
not only after enabling/disabling the service manually.
This commit is contained in:
fonfon committed 2015-05-03 16:53:47 +02:00
1 parent ef08f40447
commit 7a4486fadf
2 files changed
+15

No files matched your search

+7
View File
@@ -54,6 +54,7 @@ def parse_arguments():
subparsers.add_parser('is-running', help='Get whether PakeKite is running')
subparsers.add_parser('start-and-enable', help='Enable PageKite service')
subparsers.add_parser('stop-and-disable', help='Disable PageKite service')
subparsers.add_parser('restart', help='Restart PageKite service')
# Frontend
subparsers.add_parser('get-frontend', help='Get pagekite frontend')
@@ -95,6 +96,12 @@ def subcommand_is_running(_):
print 'yes' if util.service_is_running('pagekite') else 'no'
def subcommand_restart(_):
"""Restart the pagekite service"""
_service('restart')
print 'restarted'
def subcommand_start_and_enable(_):
aug.remove(PATHS['abort_not_configured'])
aug.save()