diff --git a/manifest.toml b/manifest.toml index 3655639..80d9009 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,11 +16,14 @@ admindoc = "https://framagit.org/chatons/chatonsinfos/-/blob/master/README.md" code = "https://framagit.org/chatons/chatonsinfos" [integration] -yunohost = ">= 11.1.0" +yunohost = ">= 11.2" architectures = "all" multi_instance = false + ldap = "not_relevant" + sso = "not_relevant" + disk = "50M" ram.build = "50M" ram.runtime = "50M" diff --git a/scripts/backup b/scripts/backup index 0fc4824..1927e79 100755 --- a/scripts/backup +++ b/scripts/backup @@ -15,11 +15,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_print_info --message="Declaring files to be backed up..." -### N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs -### to be backuped and not an actual copy of any file. The actual backup that -### creates and fill the archive with the files happens in the core after this -### script is called. Hence ynh_backups calls takes basically 0 seconds to run. - #================================================= # BACKUP THE APP MAIN DIR #================================================= diff --git a/scripts/change_url b/scripts/change_url index 6e51e15..6492778 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -3,6 +3,15 @@ source _common.sh source /usr/share/yunohost/helpers +#================================================= +# MODIFY URL IN NGINX CONF +#================================================= +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 + ynh_change_url_nginx_config +#================================================= +# END OF SCRIPT +#================================================= + ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/install b/scripts/install index a038530..0a75d0c 100755 --- a/scripts/install +++ b/scripts/install @@ -9,18 +9,12 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= - - #================================================= # STORE SETTINGS FROM MANIFEST #================================================= ynh_app_setting_set --app=$app --key=host_server_distribution --value="YunoHost" - #================================================= # APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) #================================================= @@ -28,13 +22,10 @@ ynh_app_setting_set --app=$app --key=host_server_distribution --value="YunoHost" #================================================= ynh_script_progression --message="Setting up source files..." --weight=1 -### `ynh_setup_source` is used to install an app from a zip or tar.gz file, -### downloaded from an upstream source, like a git repository. -### `ynh_setup_source` use the file conf/app.src - # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir/sources" mkdir $install_dir/public + # Empty html page to fix the CI echo "ChatonsInfos" > $install_dir/public/index.html # $install_dir will automatically be initialized with some decent @@ -66,7 +57,6 @@ orga_path="$install_dir/public/organization.properties" ynh_write_var_in_file --file="$orga_path" --key="file.datetime" --value="$(date '+%Y-%m-%dT%H:%M:%S')" ynh_write_var_in_file --file="$orga_path" --key="file.generator" --value="chatonsinfos_ynh" - chown -R $app:www-data "$install_dir/public" #================================================= @@ -82,14 +72,12 @@ generate_config_panel ynh_script_progression --message="Adding cron job to generate metrics..." --weight=1 cron_path="/etc/cron.daily/$app" -ynh_add_config --template="../conf/cron" --destination="$cron_path" +ynh_add_config --template="cron" --destination="$cron_path" chown root: "$cron_path" chmod 644 "$cron_path" -#================================================= -# GENERIC FINALIZATION -#================================================= #================================================= # END OF SCRIPT #================================================= + ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index 2b9f3ab..901e482 100755 --- a/scripts/remove +++ b/scripts/remove @@ -9,6 +9,11 @@ source _common.sh source /usr/share/yunohost/helpers +#================================================= +# REMOVE SYSTEM CONFIGURATIONS +#================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 + ynh_remove_nginx_config ynh_secure_remove --file="/etc/cron.daily/$app" diff --git a/scripts/restore b/scripts/restore index b10a405..cea07a9 100755 --- a/scripts/restore +++ b/scripts/restore @@ -17,13 +17,9 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -# $install_dir will automatically be initialized with some decent -# permission by default ... however, you may need to recursively reapply -# ownership to all files such as after the ynh_setup_source step chown -R root:root "$install_dir/sources" chown -R $app:www-data "$install_dir/public" - #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= @@ -31,7 +27,6 @@ chown -R $app:www-data "$install_dir/public" #================================================= ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 - ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/cron.daily/$app" diff --git a/scripts/upgrade b/scripts/upgrade index 76979f8..e80ded4 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,25 +11,6 @@ source /usr/share/yunohost/helpers upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# STANDARD UPGRADE STEPS -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -#ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - -# -# N.B. : the followings setting migrations snippets are provided as *EXAMPLES* -# of what you may want to do in some cases (e.g. a setting was not defined on -# some legacy installs and you therefore want to initiaze stuff during upgrade) -# - -# If db_name doesn't exist, create it -#if [ -z "$db_name" ]; then -# db_name=$(ynh_sanitize_dbid --db_name=$app) -#REMOVEME? # ynh_app_setting_set --app=$app --key=db_name --value=$db_name -#fi - #================================================= # "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) #=================================================