diff --git a/scripts/_common.sh b/scripts/_common.sh index fea6d13..ec0f54e 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version="18" +nodejs_version="20" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 022e664..b26c855 100755 --- a/scripts/install +++ b/scripts/install @@ -22,7 +22,6 @@ ynh_use_nodejs #================================================= ynh_script_progression --message="Setting up source files..." --weight=1 -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" @@ -33,13 +32,11 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 -# Create a dedicated NGINX config ynh_add_nginx_config -# Create a dedicated systemd config ynh_add_systemd_config -yunohost service add $app --description="A non-linear personal web notebook" +yunohost service add $app --description="Non-linear personal web notebook" --log="/var/log/$app/$app.log" #================================================= # ADD A CONFIGURATION diff --git a/scripts/remove b/scripts/remove index 14092e4..bac70ce 100755 --- a/scripts/remove +++ b/scripts/remove @@ -23,10 +23,8 @@ then yunohost service remove $app fi -# Remove the dedicated systemd config ynh_remove_systemd_config -# Remove the dedicated NGINX config ynh_remove_nginx_config ynh_remove_nodejs diff --git a/scripts/restore b/scripts/restore index f78ee7d..5c67bdc 100755 --- a/scripts/restore +++ b/scripts/restore @@ -36,7 +36,6 @@ chown -R $app:www-data "$data_dir" #================================================= ynh_script_progression --message="Reinstalling dependencies..." --weight=1 -# Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_use_nodejs @@ -52,7 +51,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -yunohost service add $app --description="A non-linear personal web notebook" +yunohost service add $app --description="Non-linear personal web notebook" --log="/var/log/$app/$app.log" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 9fd049a..c1b42d1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -27,14 +21,9 @@ ynh_systemd_action --service_name=$app --action="stop" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" -fi +ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -52,13 +41,11 @@ ynh_use_nodejs #================================================= ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=5 -# Create a dedicated NGINX config ynh_add_nginx_config -# Create a dedicated systemd config ynh_add_systemd_config -yunohost service add $app --description="A non-linear personal web notebook" +yunohost service add $app --description="Non-linear personal web notebook" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE