mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
deluge: Run setup and enable after install.
This commit is contained in:
1 parent
9c717246ee
commit
fd73bcd734
2 files changed
+17
-3
No files matched your search
+11
-2
@@ -55,6 +55,9 @@ def parse_arguments():
|
||||
parser = argparse.ArgumentParser()
|
||||
subparsers = parser.add_subparsers(dest='subcommand', help='Sub command')
|
||||
|
||||
# Setup deluge-web
|
||||
subparsers.add_parser('setup', help='Perform first time setup operations.')
|
||||
|
||||
# Get whether deluge-web site is enabled
|
||||
subparsers.add_parser('get-enabled',
|
||||
help='Get whether deluge-web site is enabled')
|
||||
@@ -72,6 +75,14 @@ def parse_arguments():
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def subcommand_setup(_):
|
||||
"""Perform first time setup operations."""
|
||||
setup()
|
||||
start()
|
||||
subprocess.check_call(['a2enconf', 'deluge-plinth'])
|
||||
subprocess.check_call(['service', 'apache2', 'reload'])
|
||||
|
||||
|
||||
def subcommand_get_enabled(_):
|
||||
"""Get whether deluge-web site is enabled."""
|
||||
if os.path.isfile(APACHE_CONF_ENABLED_PATH) and \
|
||||
@@ -83,8 +94,6 @@ def subcommand_get_enabled(_):
|
||||
|
||||
def subcommand_enable(_):
|
||||
"""Enable deluge-web site and start deluge-web."""
|
||||
setup()
|
||||
|
||||
start()
|
||||
subprocess.check_call(['a2enconf', 'deluge-plinth'])
|
||||
subprocess.check_call(['service', 'apache2', 'reload'])
|
||||
|
||||
Reference in new issue
Block a user