From 28137a469891025bd61dd843e87600db0dc13853 Mon Sep 17 00:00:00 2001 From: Rafi59 Date: Thu, 7 Jun 2018 12:45:26 +0200 Subject: [PATCH] Improve install and common.sh --- scripts/_common.sh | 4 ++-- scripts/install | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 05fafe3..a7fa11a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -48,7 +48,7 @@ config_nginx() { config_gitea() { ynh_backup_if_checksum_is_different "$final_path/custom/conf/app.ini" - cp "$final_path/app.ini" "$final_path/custom/conf" + cp ../conf/app.ini "$final_path/custom/conf" if [ "$path_url" = "/" ] then @@ -74,7 +74,7 @@ set_permission() { chown -R $app:$app "/home/$app" chown -R $app:$app "/var/log/$app" chmod u=rwX,g=rX,o= "$final_path" - chmod u=rwx,g=rx,o= "$final_path/gitea" + chmod u=rwx,g=rx,o= "$final_path/$app" chmod u=rwX,g=rX,o= "/home/$app" chmod u=rwX,g=rX,o= "/var/log/$app" } diff --git a/scripts/install b/scripts/install index c835815..406d689 100644 --- a/scripts/install +++ b/scripts/install @@ -72,11 +72,10 @@ ynh_add_systemd_config config_nginx # Configure gitea with app.ini file -cp -a ../conf/app.ini $final_path config_gitea # Install gitea -wget https://github.com/go-gitea/gitea/releases/download/v1.3.3/gitea-1.3.3-linux-amd64 -O $final_path/gitea +wget -O gitea https://github.com/go-gitea/gitea/releases/download/v1.3.3/gitea-1.3.3-linux-amd64 $final_path/gitea # Set permissions set_permission