From 6bca704a8dec3daf595ea50e0caa6946133b0bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:14:05 +0200 Subject: [PATCH] cleaning --- doc/DESCRIPTION_fr.md | 15 +++++++++++++++ scripts/backup | 4 ---- scripts/install | 1 - scripts/remove | 7 ------- scripts/restore | 17 ----------------- scripts/upgrade | 26 +++----------------------- 6 files changed, 18 insertions(+), 52 deletions(-) create mode 100755 doc/DESCRIPTION_fr.md diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100755 index 0000000..8f8a45e --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1,15 @@ +Un serveur Web rapide et simple pour vos fichiers, sans dépendance et avec moins de 250 lignes de code, facile à réviser. + +### Fonctionnalités + +🔍 navigateur et gestionnaire de fichiers/répertoires +📩 téléchargeur par glisser-déposer +🥂 serveur statique golang rapide +💾 interface utilisateur Web des années 90 qui imprime en quelques millisecondes +📸 streaming vidéo et navigateur d'images +✍️ éditeur de notes simple +⌨️ navigation au clavier +🚀 base de code légère et sans dépendance +🔒 >95 % de couverture de test et builds reproductibles +💑 configuration multi-compte facile, mode lecture seule +✨ PWA activé \ No newline at end of file diff --git a/scripts/backup b/scripts/backup index 2034e1d..b908c09 100644 --- a/scripts/backup +++ b/scripts/backup @@ -32,10 +32,6 @@ ynh_backup --src_path="$data_dir" --is_big ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/install b/scripts/install index eef1f33..c72fc0f 100644 --- a/scripts/install +++ b/scripts/install @@ -26,7 +26,6 @@ chmod +x "$install_dir/gossa" #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=3 -# Create a dedicated NGINX config ynh_add_nginx_config ynh_add_systemd_config diff --git a/scripts/remove b/scripts/remove index 8d9db64..970ed45 100644 --- a/scripts/remove +++ b/scripts/remove @@ -22,15 +22,8 @@ then yunohost service remove $app fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - -# Remove the dedicated systemd config ynh_remove_systemd_config -# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= diff --git a/scripts/restore b/scripts/restore index 89b8f16..24b20bb 100644 --- a/scripts/restore +++ b/scripts/restore @@ -36,19 +36,9 @@ ynh_script_progression --message="Restoring the NGINX configuration..." --weight ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE SYSTEMD -#================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=5 - ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="Webserver for your files" --log="/var/log/$app/$app.log" #================================================= @@ -58,13 +48,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 733c92d..163df78 100644 --- 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,10 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=5 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=5 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir=$install_dir -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir=$install_dir chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -48,19 +38,9 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated nginx config ynh_add_nginx_config -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=2 - # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." - yunohost service add $app --description="Webserver for your files" --log="/var/log/$app/$app.log" #=================================================