From 15cfb7d26117195fa421912450204489ef44bad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 13 Jun 2022 15:53:42 +0200 Subject: [PATCH] Update install --- scripts/install | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index f49356c..0acd0ea 100644 --- a/scripts/install +++ b/scripts/install @@ -108,15 +108,15 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Setting up backend..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src -mkdir -p "/opt/vikunja" -mkdir -p "/opt/vikunja/files" +mkdir -p "/opt/$app" +mkdir -p "/opt/$app/files" tempdir="$(mktemp -d)" ynh_setup_source --dest_dir=$tempdir --source_id=$YNH_ARCH back="$(find $tempdir -name "vikunja-*" \! -name "*.sha256")" -cp "$back" "/opt/vikunja/vikunja" +cp "$back" "/opt/$app/vikunja" -chmod +x "/opt/vikunja/vikunja" -chown -R $app:www-data "/opt/vikunja/files" +chmod +x "/opt/$app/vikunja" +chown -R $app:www-data "/opt/$app/files" #================================================= # NGINX CONFIGURATION @@ -131,12 +131,12 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -mkdir -p "/etc/vikunja" +mkdir -p "/etc/$app" redis_db=$(ynh_redis_get_free_db) -ynh_add_config --template="../conf/config.yml" --destination="/etc/vikunja/config.yml" +ynh_add_config --template="../conf/config.yml" --destination="/etc/$app/config.yml" -chmod 400 "/etc/vikunja/config.yml" -chown $app:$app "/etc/vikunja/config.yml" +chmod 400 "/etc/$app/config.yml" +chown $app:$app "/etc/$app/config.yml" #================================================= # SETUP SYSTEMD