diff --git a/manifest.toml b/manifest.toml index 3782780..7eef2df 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,12 +16,15 @@ admindoc = "https://github.com/dutchcoders/transfer.sh/" code = "https://github.com/dutchcoders/transfer.sh" [integration] -yunohost = ">= 11.2.18" +yunohost = ">= 11.2.29" helpers_version = "2.1" architectures = ["amd64", "arm64", "armhf"] multi_instance = true + ldap = "not_relevant" + sso = "not_relevant" + disk = "50M" ram.build = "50M" ram.runtime = "50M" diff --git a/scripts/backup b/scripts/backup index 8ff9300..96f73ba 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,6 +1,5 @@ #!/bin/bash -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -24,18 +23,8 @@ ynh_backup "$data_dir" ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP LOGROTATE -#================================================= - ynh_backup "/etc/logrotate.d/$app" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup "/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/install b/scripts/install index bb32fd1..8a69028 100755 --- a/scripts/install +++ b/scripts/install @@ -8,11 +8,8 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Setting up source files..." -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" chmod +x $install_dir/transfersh #================================================= @@ -20,13 +17,10 @@ chmod +x $install_dir/transfersh #================================================= ynh_script_progression "Configuring NGINX web server..." -# Create a dedicated NGINX config ynh_config_add_nginx -# Create a dedicated systemd config ynh_config_add_systemd -# Use logrotate to manage application logfile(s) ynh_config_add_logrotate yunohost service add $app --description="Easy and fast file sharing from the command-line" --log="/var/log/$app/$app.log" @@ -36,7 +30,6 @@ yunohost service add $app --description="Easy and fast file sharing from the com #================================================= ynh_script_progression "Starting $app's systemd service..." -# Start a systemd service ynh_systemctl --service=$app --action="start" #================================================= diff --git a/scripts/remove b/scripts/remove index 5c5bc19..5764389 100755 --- a/scripts/remove +++ b/scripts/remove @@ -9,20 +9,16 @@ source /usr/share/yunohost/helpers # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= -# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_hide_warnings yunohost service status $app >/dev/null then ynh_script_progression "Removing $app service integration..." yunohost service remove $app fi -# Remove the dedicated systemd config ynh_config_remove_systemd -# Remove the app-specific logrotate config ynh_config_remove_logrotate -# Remove the dedicated NGINX config ynh_config_remove_nginx #================================================= diff --git a/scripts/restore b/scripts/restore index 217563c..2c9431b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,6 +1,5 @@ #!/bin/bash -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -11,8 +10,6 @@ ynh_script_progression "Restoring the app main directory..." ynh_restore "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # RESTORE THE DATA DIRECTORY #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 44ac520..19c2a6a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -13,18 +13,10 @@ ynh_systemctl --service=$app --action="stop" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression "Upgrading source files..." -# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed -if ynh_app_upstream_version_changed -then - ynh_script_progression "Upgrading source files..." +ynh_setup_source --dest_dir="$install_dir" - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" -fi - -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" chmod +x $install_dir/transfersh #================================================= @@ -32,13 +24,10 @@ chmod +x $install_dir/transfersh #================================================= ynh_script_progression "Upgrading NGINX web server configuration..." -# Create a dedicated NGINX config ynh_config_add_nginx -# Create a dedicated systemd config ynh_config_add_systemd -# Use logrotate to manage app-specific logfile(s) ynh_config_add_logrotate yunohost service add $app --description="Easy and fast file sharing from the command-line" --log="/var/log/$app/$app.log"