ikiwiki: Use a2query to check if enabled.

This commit is contained in:
James Valleroy 2015-06-07 11:09:34 -04:00 committed by Sunil Mohan Adapa
parent be14b49c83
commit 9d6ceaa0ff

View File

@ -82,9 +82,10 @@ def subcommand_setup(_):
def subcommand_get_enabled(_):
"""Get whether ikiwiki site is enabled."""
if os.path.isfile(CONFIG_ENABLE):
try:
subprocess.check_output(['a2query', '-c', 'ikiwiki-plinth'])
print('yes')
else:
except subprocess.CalledProcessError:
print('no')