From 3d45d9b138457c696dd781f868c0c025fbf09ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Sun, 5 Mar 2017 17:27:33 +0100 Subject: [PATCH] still working on multi-instance --- scripts/_common.sh | 2 -- scripts/install | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b729181..f43edad 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -13,8 +13,6 @@ FRESHRSS_SOURCE_URL="https://github.com/FreshRSS/FreshRSS/archive/1.6.2.tar.gz" PKGDIR=$(cd ../; pwd) -FINAL_PATH="/var/www/freshrss" - #apt dependencies DEPS_PKG_NAME="freshrss-deps" diff --git a/scripts/install b/scripts/install index 026601a..c23c7f8 100755 --- a/scripts/install +++ b/scripts/install @@ -15,6 +15,8 @@ app=$YNH_APP_INSTANCE_NAME db_user=$app db_name=$app +FINAL_PATH="/var/www/$app" + # Source app helpers . /usr/share/yunohost/helpers @@ -26,7 +28,7 @@ if [[ $admin_user != '' ]]; then fi # Check domain/path availability -sudo yunohost app checkurl $domain$path -a freshrss || ynh_die "The path ${domain}${path} is not available for app installation." +sudo yunohost app checkurl $domain$path -a $app || ynh_die "The path ${domain}${path} is not available for app installation." #install php5-cli ynh_package_install_from_equivs ../conf/${DEPS_PKG_NAME}.control \ @@ -58,7 +60,7 @@ sudo mv $TMPDIR $FINAL_PATH # Modify Nginx configuration file and copy it to Nginx conf directory sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf sed -i "s@ALIASTOCHANGE@$FINAL_PATH/@g" ../conf/nginx.conf -sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/freshrss.conf +sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf #install update cron # Add cron job