1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00

[fix][WIP]fix wallabag detection

This commit is contained in:
Clément 2016-09-04 12:57:20 +02:00
parent 117fd4864d
commit 635f4ba24e

View file

@ -63,19 +63,23 @@ fi
# Add users
#check wallabag
if [[ $(sudo yunohost app list --installed -f wallabag2 | grep -q 'installed: True') -eq 0 ]]; then
sudo yunohost app list --installed -f wallabag2 --json | grep -q '"installed": true'
if [[ "$?" -eq 0 ]]; then
echo "Detected wallabag V2"
wallabagPath=$(sudo yunohost app setting wallabag2 path | sed 's#/*$##')
wallabagUrl=$domain$wallabagPath
sharingWallabag="'sharing' => \n\tarray( \n\t\t0 => \n\t\tarray(\n\t\t\t'type' => 'wallabagv2',\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 | grep -q 'installed: True') -eq 0 ]]; then
else
sudo yunohost app list --installed -f wallabag --json | grep -q '"installed": true'
if [[ "$?" -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
fi
fi
freshrss_users=$(ldapsearch -h localhost -b ou=users,dc=yunohost,dc=org -x objectClass=mailAccount uid | grep uid: | sed 's/uid: //' | xargs)
for myuser in $freshrss_users