mirror of
https://github.com/YunoHost-Apps/freshrss_ynh.git
synced 2024-09-03 18:36:33 +02:00
[fix][WIP]Fix detect wallabag
This commit is contained in:
parent
092ddf5226
commit
773a1ff7b0
1 changed files with 9 additions and 12 deletions
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Exit on command errors and treat unset variables as an error
|
# Exit on command errors and treat unset variables as an error
|
||||||
#set -eu
|
set -eu
|
||||||
|
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
domain=$1
|
domain=$1
|
||||||
|
@ -63,23 +63,20 @@ fi
|
||||||
# Add users
|
# Add users
|
||||||
|
|
||||||
#check wallabag
|
#check wallabag
|
||||||
blabla=$(sudo yunohost app list --installed -f wallabag2 --json | grep -q '"installed": true')
|
#if [[ $(sudo yunohost app list --installed -f wallabag2 --json | grep -q '"installed": true') -eq 0 ]]; then
|
||||||
if [[ $blabla -eq 0 ]]; then
|
if sudo yunohost app list --installed -f wallabag2 | grep -q id ; then
|
||||||
echo "Detected wallabag V2"
|
echo "Detected wallabag V2"
|
||||||
wallabagPath=$(sudo yunohost app setting wallabag2 path | sed 's#/*$##')
|
wallabagPath=$(sudo yunohost app setting wallabag2 path | sed 's#/*$##')
|
||||||
wallabagUrl=$domain$wallabagPath
|
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),"
|
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
|
sharingEnable=1
|
||||||
else
|
elif sudo yunohost app list --installed -f wallabag | grep -q id ; then
|
||||||
blabla=$(sudo yunohost app list --installed -f wallabag --json | grep -q '"installed": true')
|
|
||||||
if [[ $blabla -eq 0 ]]; then
|
|
||||||
echo "Detected wallabag"
|
echo "Detected wallabag"
|
||||||
wallabagPath=$(sudo yunohost app setting wallabag path)
|
wallabagPath=$(sudo yunohost app setting wallabag path)
|
||||||
wallabagUrl=$domain$wallabagPath
|
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),"
|
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
|
sharingEnable=1
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
freshrss_users=$(ldapsearch -h localhost -b ou=users,dc=yunohost,dc=org -x objectClass=mailAccount uid | grep uid: | sed 's/uid: //' | xargs)
|
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
|
for myuser in $freshrss_users
|
||||||
|
|
Loading…
Reference in a new issue