From 245ec21c2e72b530e1627267df863c1188900e20 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 5 Aug 2021 21:00:43 +0200 Subject: [PATCH] Update install --- scripts/install | 52 ++++++++++++++++++++----------------------------- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/scripts/install b/scripts/install index e9d5039..731b6d0 100644 --- a/scripts/install +++ b/scripts/install @@ -84,17 +84,6 @@ ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_psql_test_if_first_run ynh_psql_setup_db --db_user=$db_name --db_name=$db_name -#================================================= -# INSTALL BACKEND -#================================================= -ynh_script_progression --message="Installing backend..." --weight=15 - -tempdir="$(mktemp -d)" -ynh_setup_source --dest_dir=$tempdir --source_id=vikunja -ynh_exec_warn_less dpkg -i $tempdir/vikunja-unstable-amd64.deb - -chmod +x /opt/vikunja/vikunja - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -108,6 +97,27 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +redis_db=$(ynh_redis_get_free_db) +ynh_add_config --template="../conf/config.yml" --destination="/etc/vikunja/config.yml" + +#chmod 600 "/etc/vikunja/config.yml" + +#================================================= +# INSTALL BACKEND +#================================================= +ynh_script_progression --message="Installing backend..." --weight=15 + +tempdir="$(mktemp -d)" +ynh_setup_source --dest_dir=$tempdir --source_id=vikunja +ynh_exec_warn_less dpkg -i $tempdir/vikunja-unstable-amd64.deb + +chmod +x /opt/vikunja/vikunja + #================================================= # NGINX CONFIGURATION #================================================= @@ -116,26 +126,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=3 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# HANDLE LOG FILES AND LOGROTATE -#================================================= -ynh_script_progression --message="Configuring log rotation..." - -# Create log directory -mkdir -p /var/log/$app -touch /var/log/$app/$app.log -chown -R $app /var/log/$app - -#================================================= -# ADD A CONFIGURATION -#================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 - -redis_db=$(ynh_redis_get_free_db) -ynh_add_config --template="../conf/config.yml" --destination="/opt/vikunja/config.yml" - -#chmod 600 "/etc/vikunja/config.yml" - #================================================= # SETUP SYSTEMD #=================================================