From 9d6ceaa0ff9bf62d1b702efedc0df40967df6d62 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Sun, 7 Jun 2015 11:09:34 -0400 Subject: [PATCH] ikiwiki: Use a2query to check if enabled. --- actions/ikiwiki | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/actions/ikiwiki b/actions/ikiwiki index e03001772..a341f1340 100755 --- a/actions/ikiwiki +++ b/actions/ikiwiki @@ -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')