From 994faebfa19f992b8f5c6fe22b021506799d719a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Sun, 4 Sep 2016 11:26:23 +0200 Subject: [PATCH] [fix][WIP]Detect if wallabagV2 or wallabag is installed --- scripts/install | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index d95dec0..67daa47 100755 --- a/scripts/install +++ b/scripts/install @@ -63,12 +63,18 @@ fi # Add users #check wallabag -if [[ $(sudo yunohost app list -f wallabag | /bin/grep -q "installed: True") -eq 0 ]]; then +if [[ $(sudo yunohost app list --installed -f wallabag2) -eq 0 ]]; then + echo "Detected wallabag V2" + wallabagPath=$(sudo yunohost app setting wallabag2 path) + wallabagUrl=$domain$wallabagPath + sharingWallabag="'sharing' => \n\tarray( \n\t\t0 => \n\t\tarray(\n\t\t\t'type' => 'wallabag',\n\t\t\t'name' => 'Wallabag',\n\t\t\t'url' => 'https://$wallabagUrl',\n\t\t)," + sharingEnable=1 +elif [[ $(sudo yunohost app list --installed -f wallabag) -eq 0 ]]; then echo "Detected wallabag" - wallabagPath=$(sudo yunohost app setting wallabag path) - wallabagUrl=$domain$wallabagPath - sharingWallabag="'sharing' => \n\tarray( \n\t\t0 => \n\t\tarray(\n\t\t\t'type' => 'wallabag',\n\t\t\t'name' => 'Wallabag',\n\t\t\t'url' => 'https://$wallabagUrl',\n\t\t)," - sharingEnable=1 + wallabagPath=$(sudo yunohost app setting wallabag path) + wallabagUrl=$domain$wallabagPath + sharingWallabag="'sharing' => \n\tarray( \n\t\t0 => \n\t\tarray(\n\t\t\t'type' => 'wallabag',\n\t\t\t'name' => 'Wallabag',\n\t\t\t'url' => 'https://$wallabagUrl',\n\t\t)," + sharingEnable=1 fi freshrss_users=$(ldapsearch -h localhost -b ou=users,dc=yunohost,dc=org -x objectClass=mailAccount uid | grep uid: | sed 's/uid: //' | xargs)