ikiwiki: Use a2query to check if enabled.

This commit is contained in:
James Valleroy authored and Sunil Mohan Adapa committed 2015-06-26 17:34:37 +05:30
1 parent be14b49c83
commit 9d6ceaa0ff
1 file changed
+3 -2
+3 -2
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')