From bede450e88c92fa69e8067d5c92737d6ca51e136 Mon Sep 17 00:00:00 2001 From: frju365 Date: Sun, 22 Oct 2017 13:10:19 +0200 Subject: [PATCH] install: use app.src --- scripts/install | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/scripts/install b/scripts/install index 009a500..4da5910 100644 --- a/scripts/install +++ b/scripts/install @@ -72,8 +72,6 @@ root_path="$(pwd)/.." final_path="/var/www/$app" data_path="/home/yunohost.app/$app" logs_path="/var/log/$app" -version=$(cat "$root_path/VERSION") -archive_filename="mattermost-$version.tar.gz" #================================================= # CREATE A MYSQL DATABASE @@ -97,16 +95,12 @@ ynh_app_setting_set mattermost smtppwd "$smtp_password" # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -archive_url="https://releases.mattermost.com/${version}/mattermost-team-${version}-linux-amd64.tar.gz" +ynh_app_setting_set "$app" final_path "$final_path" +ynh_setup_source "$final_path" -sudo mkdir -p "$final_path" sudo mkdir -p "$data_path" sudo mkdir -p "$logs_path" -sudo wget --quiet --output-document "$archive_filename" "$archive_url" -sudo tar -xvz --file "$archive_filename" --directory "$final_path" --strip-components 1 -sudo rm -f "$archive_filename" - #================================================= # EDIT MATTERMOST CONFIG #=================================================