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
|
||||
|
||||
# Exit on command errors and treat unset variables as an error
|
||||
#set -eu
|
||||
set -eu
|
||||
|
||||
# Retrieve arguments
|
||||
domain=$1
|
||||
|
@ -63,22 +63,19 @@ fi
|
|||
# Add users
|
||||
|
||||
#check wallabag
|
||||
blabla=$(sudo yunohost app list --installed -f wallabag2 --json | grep -q '"installed": true')
|
||||
if [[ $blabla -eq 0 ]]; then
|
||||
#if [[ $(sudo yunohost app list --installed -f wallabag2 --json | grep -q '"installed": true') -eq 0 ]]; then
|
||||
if sudo yunohost app list --installed -f wallabag2 | grep -q id ; 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
|
||||
else
|
||||
blabla=$(sudo yunohost app list --installed -f wallabag --json | grep -q '"installed": true')
|
||||
if [[ $blabla -eq 0 ]]; then
|
||||
elif sudo yunohost app list --installed -f wallabag | grep -q id ; 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)
|
||||
|
|
Loading…
Reference in a new issue