1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00
This commit is contained in:
Clément 2017-02-14 10:58:25 +01:00
parent eda7b082f9
commit 41f44720cf
6 changed files with 8 additions and 25 deletions

View file

@ -34,5 +34,5 @@ extract_freshrss() {
|| ynh_die "Invalid checksum of downloaded tarball" || ynh_die "Invalid checksum of downloaded tarball"
tar xf "$rc_tarball" -C "$DESTDIR" --strip-components 1 \ tar xf "$rc_tarball" -C "$DESTDIR" --strip-components 1 \
|| ynh_die "Unable to extract FreshRss tarball" || ynh_die "Unable to extract FreshRss tarball"
rm "$rc_tarball" sudo rm "$rc_tarball"
} }

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -e set -eu
# The parameter $1 is the backup directory location dedicated to the app # The parameter $1 is the backup directory location dedicated to the app
BACKUP_DIR=$1 BACKUP_DIR=$1

View file

@ -48,22 +48,6 @@ extract_freshrss "$TMPDIR"
$TMPDIR/cli/do-install.php --default_user $admin_user --auth_type http_auth --environment production --base_url $domain/$path --title FreshRSS --api_enabled --db-type mysql --db-host localhost --db-user $db_user --db-password $db_pwd --db-base $db_name $TMPDIR/cli/do-install.php --default_user $admin_user --auth_type http_auth --environment production --base_url $domain/$path --title FreshRSS --api_enabled --db-type mysql --db-host localhost --db-user $db_user --db-password $db_pwd --db-base $db_name
# Add users # Add users
#check wallabag
sharingEnable=0
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
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
for myuser in $(ynh_user_list) for myuser in $(ynh_user_list)
do do
user_token=$(ynh_string_random) user_token=$(ynh_string_random)

View file

@ -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 -u
# Source app helpers # Source app helpers
. /usr/share/yunohost/helpers . /usr/share/yunohost/helpers

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -e set -eu
# The parameter $1 is the backup directory location dedicated to the app # The parameter $1 is the backup directory location dedicated to the app
BACKUP_DIR=$1 BACKUP_DIR=$1

View file

@ -8,6 +8,10 @@ set -eu
# Source app helpers # Source app helpers
. /usr/share/yunohost/helpers . /usr/share/yunohost/helpers
#install extention for api if necessary
ynh_package_install_from_equivs ../conf/${DEPS_PKG_NAME}.control \
|| ynh_die "Unable to install dependencies"
#old version cleanup #old version cleanup
if [ -f $FINAL_PATH/data/user.php.dist ]; then if [ -f $FINAL_PATH/data/user.php.dist ]; then
sudo rm $FINAL_PATH/data/user.php.dist sudo rm $FINAL_PATH/data/user.php.dist
@ -36,8 +40,3 @@ sudo chown -R www-data: $TMPDIR/extensions/
# Clean up existing files and copy new files to the right place # Clean up existing files and copy new files to the right place
sudo rm -rf "$FINAL_PATH" sudo rm -rf "$FINAL_PATH"
sudo cp -rp "$TMPDIR" "$FINAL_PATH" sudo cp -rp "$TMPDIR" "$FINAL_PATH"
#install extention for api if necessary
ynh_package_install_from_equivs ../conf/${DEPS_PKG_NAME}.control \
|| ynh_die "Unable to install dependencies"