From b5acfb0d84947e1b3c0a371395760c2937109e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 26 May 2023 09:25:08 +0200 Subject: [PATCH 01/15] v2 --- manifest.toml | 60 ++++++++++++++++++++++++++++++++++++++++ scripts/_common.sh | 4 +-- scripts/backup | 12 ++++---- scripts/change_url | 64 ++++++++++++++++++++++--------------------- scripts/install | 68 +++++++++++++++++++++++----------------------- scripts/remove | 24 ++++++++-------- scripts/restore | 40 +++++++++++++-------------- scripts/upgrade | 46 +++++++++++++++---------------- 8 files changed, 190 insertions(+), 128 deletions(-) create mode 100644 manifest.toml diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 0000000..4ef4ad4 --- /dev/null +++ b/manifest.toml @@ -0,0 +1,60 @@ +packaging_format = 2 + +id = "openproject" +name = "OpenProject" +description.en = "web-based project management software" + +version = "10.5.1~ynh1" + +maintainers = ["Moutonjr \"Geoff\""] + +[upstream] +license = "GPL-3.0-or-later" +website = "https://www.openproject.org/" +admindoc = "https://www.openproject.org/docs/" +code = "https://github.com/opf/openproject" +cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number) +fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. + +[integration] +yunohost = ">= 4.3.0" +architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"] +multi_instance = false +ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials. +sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal. +disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... +ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... + +[install] + [install.domain] + # this is a generic question - ask strings are automatically handled by Yunohost's core + type = "domain" + full_domain = true + + [install.init_main_permission] + help.en = "A public Openproject app could be less secure depending your configuration. Butit can allow external people from your Yunohost instance to participate to project management." + type = "group" + default = "visitors" + + [install.language] + ask.en = "Choose the application language" + ask.fr = "Choisissez la langue de l'application" + type = "string" + choices = ["fr", "en"] + default = "en" + +[resources] + [resources.system_user] + + [resources.install_dir] + + [resources.permissions] + main.url = "/" + [[resources.apt.extras]] + repo = "deb https://dl.packager.io/srv/deb/opf/openproject/stable/$PROJECT_VERSION/debian $debian_release main" + key = "https://dl.packager.io/srv/opf/openproject/key" + packages = "#FIXME#$extra_pkg_dependencies" + + [resources.database] + type = "postgresql" diff --git a/scripts/_common.sh b/scripts/_common.sh index 81eb56a..b278e98 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,8 +7,8 @@ PROJECT_VERSION=12 # dependencies used by the app -pkg_dependencies="apt-transport-https memcached postgresql postgresql-common" -extra_pkg_dependencies="openproject" +#REMOVEME? pkg_dependencies="apt-transport-https memcached postgresql postgresql-common" +#REMOVEME? extra_pkg_dependencies="openproject" #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index d1a2235..a22d8a6 100755 --- a/scripts/backup +++ b/scripts/backup @@ -14,21 +14,21 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { true } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info --message="Loading installation settings..." +#REMOVEME? ynh_print_info --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP diff --git a/scripts/change_url b/scripts/change_url index cf6bc18..e475f1b 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -13,54 +13,54 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS #================================================= -old_domain=$YNH_APP_OLD_DOMAIN -old_path=$YNH_APP_OLD_PATH +#REMOVEME? old_domain=$YNH_APP_OLD_DOMAIN +#REMOVEME? old_path=$YNH_APP_OLD_PATH -new_domain=$YNH_APP_NEW_DOMAIN -new_path="/" +#REMOVEME? new_domain=$YNH_APP_NEW_DOMAIN +#REMOVEME? new_path="/" -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +#REMOVEME? ynh_script_progression --message="Loading installation settings..." -# Needed for helper "ynh_add_nginx_config" -port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? # Needed for helper "ynh_add_nginx_config" +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." +#REMOVEME? ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." # Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - ynh_clean_check_starting +#REMOVEME? ynh_backup_before_upgrade +#REMOVEME? ynh_clean_setup () { + #REMOVEME? ynh_clean_check_starting # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. - ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" +#REMOVEME? ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" # Restore it if the upgrade fails - ynh_restore_upgradebackup +#REMOVEME? ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # CHECK WHICH PARTS SHOULD BE CHANGED #================================================= -change_domain=0 -if [ "$old_domain" != "$new_domain" ] +#REMOVEME? change_domain=0 +#REMOVEME? if [ "$old_domain" != "$new_domain" ] then - change_domain=1 + #REMOVEME? change_domain=1 fi -change_path=0 -if [ "$old_path" != "$new_path" ] +#REMOVEME? change_path=0 +#REMOVEME? if [ "$old_path" != "$new_path" ] then - change_path=1 + #REMOVEME? change_path=1 fi #================================================= @@ -77,28 +77,30 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." -nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf +ynh_change_url_nginx_config + +#REMOVEME? nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf # Change the path in the NGINX config file if [ $change_path -eq 1 ] then # Make a backup of the original NGINX config file if modified - ynh_backup_if_checksum_is_different --file="$nginx_conf_path" +#REMOVEME? ynh_backup_if_checksum_is_different --file="$nginx_conf_path" # Set global variables for NGINX helper - domain="$old_domain" - path_url="$new_path" +#REMOVEME? domain="$old_domain" +#REMOVEME? path="$new_path" # Create a dedicated NGINX config - ynh_add_nginx_config +#REMOVEME? ynh_add_nginx_config fi # Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location - ynh_delete_file_checksum --file="$nginx_conf_path" - mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf +#REMOVEME? ynh_delete_file_checksum --file="$nginx_conf_path" +#REMOVEME? mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf # Store file checksum for the new config file location - ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" +#REMOVEME? ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi #================================================= @@ -114,9 +116,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." -ynh_systemd_action --service_name=nginx --action=reload +#REMOVEME? #REMOVEME? ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index da84892..5ef207f 100755 --- a/scripts/install +++ b/scripts/install @@ -13,22 +13,22 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { ynh_clean_check_starting } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -domain=$YNH_APP_ARG_DOMAIN -path_url="/" -is_public=$YNH_APP_ARG_IS_PUBLIC -language=$YNH_APP_ARG_LANGUAGE +#REMOVEME? domain=$YNH_APP_ARG_DOMAIN +path="/" +#REMOVEME? is_public=$YNH_APP_ARG_IS_PUBLIC +#REMOVEME? language=$YNH_APP_ARG_LANGUAGE -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME # Installer variables _homedir="/var/$app/" @@ -36,18 +36,18 @@ _homedir="/var/$app/" #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." +#REMOVEME? ynh_script_progression --message="Validating installation parameters..." # Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url +#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." +#REMOVEME? ynh_script_progression --message="Storing installation settings..." -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url +#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain +#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path ynh_app_setting_set --app=$app --key=language --value=$language ynh_app_setting_set --app=$app --key=_homedir --value=$_homedir @@ -56,41 +56,41 @@ ynh_app_setting_set --app=$app --key=_homedir --value=$_homedir #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Finding an available port..." +#REMOVEME? ynh_script_progression --message="Finding an available port..." # Find an available port -port=$(ynh_find_port --port=8095) -ynh_app_setting_set --app=$app --key=port --value=$port +#REMOVEME? port=$(ynh_find_port --port=8095) +#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing OpenProject & its dependencies..." +#REMOVEME? ynh_script_progression --message="Installing OpenProject & its dependencies..." debian_release=$(lsb_release -r -s) -ynh_install_app_dependencies $pkg_dependencies -ynh_install_extra_app_dependencies --repo="deb https://dl.packager.io/srv/deb/opf/openproject/stable/$PROJECT_VERSION/debian $debian_release main" --package="$extra_pkg_dependencies" --key="https://dl.packager.io/srv/opf/openproject/key" +#REMOVEME? ynh_install_app_dependencies $pkg_dependencies +#REMOVEME? ynh_install_extra_app_dependencies --repo="deb https://dl.packager.io/srv/deb/opf/openproject/stable/$PROJECT_VERSION/debian $debian_release main" --package="$extra_pkg_dependencies" --key="https://dl.packager.io/srv/opf/openproject/key" #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Configuring system user..." +#REMOVEME? ynh_script_progression --message="Configuring system user..." # Create a system user -ynh_system_user_create --username=$app +#REMOVEME? ynh_system_user_create --username=$app #================================================= # CREATE A POSTGRESQL DATABASE #================================================= -ynh_script_progression --message="Creating a PostgreSQL database..." +#REMOVEME? ynh_script_progression --message="Creating a PostgreSQL database..." -ynh_psql_test_if_first_run +#REMOVEME? ynh_psql_test_if_first_run -db_name=$(ynh_sanitize_dbid --db_name=$app) -db_user=$db_name -ynh_app_setting_set --app=$app --key=db_name --value=$db_name -ynh_psql_setup_db --db_user=$db_user --db_name=$db_name -db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) +#REMOVEME? db_name=$(ynh_sanitize_dbid --db_name=$app) +#REMOVEME? db_user=$db_name +#REMOVEME? ynh_app_setting_set --app=$app --key=db_name --value=$db_name +#REMOVEME? ynh_psql_setup_db --db_user=$db_user --db_name=$db_name +#REMOVEME? db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) #================================================= # NGINX CONFIGURATION @@ -142,7 +142,7 @@ chown -R $app:$app "/etc/openproject/" openproject config:set PORT=$port openproject config:set SERVER_PROTOCOL_FORCE_HTTPS="true" openproject config:set SERVER_HOSTNAME=$domain -openproject config:set SERVER_PATH_PREFIX=$path_url +openproject config:set SERVER_PATH_PREFIX=$path openproject configure >> "$YNH_STDINFO" @@ -166,24 +166,24 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring permissions..." +#REMOVEME? ynh_script_progression --message="Configuring permissions..." # Make app public if necessary -if [ $is_public -eq 1 ] +#REMOVEME? if [ $is_public -eq 1 ] then # Everyone can access the app. # The "main" permission is automatically created before the install script. - ynh_permission_update --permission="main" --add="visitors" +#REMOVEME? ynh_permission_update --permission="main" --add="visitors" fi -ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" +#REMOVEME? ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." -ynh_systemd_action --service_name=nginx --action=reload +#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT diff --git a/scripts/remove b/scripts/remove index b139942..7906517 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,14 +12,14 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +#REMOVEME? ynh_script_progression --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -_homedir=$(ynh_app_setting_get --app=$app --key=_homedir) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#REMOVEME? db_user=$db_name +#REMOVEME? _homedir=$(ynh_app_setting_get --app=$app --key=_homedir) #================================================= # STANDARD REMOVE @@ -45,10 +45,10 @@ ynh_remove_systemd_config #================================================= # REMOVE THE POSTGRESQL DATABASE #================================================= -ynh_script_progression --message="Removing the PostgreSQL database..." +#REMOVEME? ynh_script_progression --message="Removing the PostgreSQL database..." # Remove a database if it exists, along with the associated user -ynh_psql_remove_db --db_user=$db_user --db_name=$db_name +#REMOVEME? ynh_psql_remove_db --db_user=$db_user --db_name=$db_name #================================================= # REMOVE NGINX CONFIGURATION @@ -61,10 +61,10 @@ ynh_remove_nginx_config #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies..." +#REMOVEME? ynh_script_progression --message="Removing dependencies..." # Remove metapackage and its dependencies -ynh_remove_app_dependencies +#REMOVEME? ynh_remove_app_dependencies #================================================= # SPECIFIC REMOVE @@ -83,10 +83,10 @@ ynh_secure_remove --file="/etc/$app" #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Removing the dedicated system user..." +#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." # Delete a system user -ynh_system_user_delete --username=$app +#REMOVEME? ynh_system_user_delete --username=$app #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index a410887..bd9fa33 100755 --- a/scripts/restore +++ b/scripts/restore @@ -14,29 +14,29 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { ynh_clean_check_starting } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +#REMOVEME? ynh_script_progression --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#REMOVEME? db_user=$db_name +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." +#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." #================================================= # STANDARD RESTORATION STEPS @@ -50,30 +50,30 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RECREATE THE DEDICATED USER #================================================= -ynh_script_progression --message="Recreating the dedicated system user..." +#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app +#REMOVEME? ynh_system_user_create --username=$app #================================================= # SPECIFIC RESTORATION #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." +#REMOVEME? ynh_script_progression --message="Reinstalling dependencies..." debian_release=$(lsb_release -r -s) -ynh_install_app_dependencies $pkg_dependencies -ynh_install_extra_app_dependencies --repo="deb https://dl.packager.io/srv/deb/opf/openproject/stable/$PROJECT_VERSION/debian $debian_release main" --package="$extra_pkg_dependencies" --key="https://dl.packager.io/srv/opf/openproject/key" +#REMOVEME? ynh_install_app_dependencies $pkg_dependencies +#REMOVEME? ynh_install_extra_app_dependencies --repo="deb https://dl.packager.io/srv/deb/opf/openproject/stable/$PROJECT_VERSION/debian $debian_release main" --package="$extra_pkg_dependencies" --key="https://dl.packager.io/srv/opf/openproject/key" #================================================= # RESTORE THE POSTGRESQL DATABASE #================================================= -ynh_script_progression --message="Restoring the PostgreSQL database..." +#REMOVEME? ynh_script_progression --message="Restoring the PostgreSQL database..." -db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) -ynh_psql_test_if_first_run -ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd +#REMOVEME? db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) +#REMOVEME? ynh_psql_test_if_first_run +#REMOVEME? ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name #================================================= @@ -90,7 +90,7 @@ chown -R $app:$app "/etc/openproject/" openproject config:set PORT=$port openproject config:set SERVER_PROTOCOL_FORCE_HTTPS="true" openproject config:set SERVER_HOSTNAME=$domain -openproject config:set SERVER_PATH_PREFIX=$path_url +openproject config:set SERVER_PATH_PREFIX=$path openproject configure >> "$YNH_STDINFO" diff --git a/scripts/upgrade b/scripts/upgrade index 9f806a5..a286adc 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,15 +12,15 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +#REMOVEME? ynh_script_progression --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -language=$(ynh_app_setting_get --app=$app --key=language) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? language=$(ynh_app_setting_get --app=$app --key=language) +#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # CHECK VERSION @@ -32,17 +32,17 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." +#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." # Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { +#REMOVEME? ynh_backup_before_upgrade +#REMOVEME? ynh_clean_setup () { ynh_clean_check_starting # Restore it if the upgrade fails - ynh_restore_upgradebackup +#REMOVEME? ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # STANDARD UPGRADE STEPS @@ -59,24 +59,24 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" ynh_script_progression --message="Ensuring downward compatibility..." # Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all +#REMOVEME? if ynh_legacy_permissions_exists; then +#REMOVEME? ynh_legacy_permissions_delete_all ynh_app_setting_delete --app=$app --key=is_public fi # Create a permission if needed -if ! ynh_permission_exists --permission="api"; then - ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" +#REMOVEME? if ! ynh_permission_exists --permission="api"; then +#REMOVEME? ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" fi #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." +#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app +#REMOVEME? ynh_system_user_create --username=$app #================================================= # NGINX CONFIGURATION @@ -89,11 +89,11 @@ ynh_add_nginx_config #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading dependencies..." +#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." debian_release=$(lsb_release -r -s) -ynh_install_app_dependencies $pkg_dependencies -ynh_install_extra_app_dependencies --repo="deb https://dl.packager.io/srv/deb/opf/openproject/stable/$PROJECT_VERSION/debian $debian_release main" --package="$extra_pkg_dependencies" --key="https://dl.packager.io/srv/opf/openproject/key" +#REMOVEME? ynh_install_app_dependencies $pkg_dependencies +#REMOVEME? ynh_install_extra_app_dependencies --repo="deb https://dl.packager.io/srv/deb/opf/openproject/stable/$PROJECT_VERSION/debian $debian_release main" --package="$extra_pkg_dependencies" --key="https://dl.packager.io/srv/opf/openproject/key" #================================================= # GENERIC FINALIZATION @@ -114,9 +114,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." -ynh_systemd_action --service_name=nginx --action=reload +#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT From 8469d6132fa319c8523e171fb7f0fcd1267a7d69 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 26 May 2023 07:25:14 +0000 Subject: [PATCH 02/15] Auto-update README --- README.md | 22 +++++++++++----------- README_fr.md | 36 ++++++++++++++++++++---------------- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 78ad5a0..cc57d62 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ It shall NOT be edited by hand. # OpenProject for YunoHost -[![Integration level](https://dash.yunohost.org/integration/openproject.svg)](https://dash.yunohost.org/appci/app/openproject) ![](https://ci-apps.yunohost.org/ci/badges/openproject.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/openproject.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/openproject.svg)](https://dash.yunohost.org/appci/app/openproject) ![Working status](https://ci-apps.yunohost.org/ci/badges/openproject.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/openproject.maintain.svg) + [![Install OpenProject with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=openproject) *[Lire ce readme en français.](./README_fr.md)* @@ -31,32 +32,31 @@ OpenProject is a web-based project management software. Its key features are: **Shipped version:** 10.5.1~ynh1 - - ## Screenshots -![](./doc/screenshots/screenshot1.png) +![Screenshot of OpenProject](./doc/screenshots/screenshot1.png) ## Disclaimers / important information * default user and password is admin / admin ## Documentation and resources -* Official app website: https://www.openproject.org/ -* Official admin documentation: https://www.openproject.org/docs/ -* Upstream app code repository: https://github.com/opf/openproject -* YunoHost documentation for this app: https://yunohost.org/app_openproject -* Report a bug: https://github.com/YunoHost-Apps/openproject_ynh/issues +* Official app website: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/openproject_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/openproject_ynh/tree/testing --debug or sudo yunohost app upgrade openproject -u https://github.com/YunoHost-Apps/openproject_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 8fe0162..9412597 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,15 +1,20 @@ + + # OpenProject pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/openproject.svg)](https://dash.yunohost.org/appci/app/openproject) ![](https://ci-apps.yunohost.org/ci/badges/openproject.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/openproject.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/openproject.svg)](https://dash.yunohost.org/appci/app/openproject) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/openproject.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/openproject.maintain.svg) + [![Installer OpenProject avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=openproject) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* -> *Ce package vous permet d'installer OpenProject rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d’installer OpenProject rapidement et simplement sur un serveur YunoHost. +Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* -## Vue d'ensemble +## Vue d’ensemble ## Overview OpenProject is a web-based project management software. Its key features are: @@ -27,32 +32,31 @@ OpenProject is a web-based project management software. Its key features are: **Version incluse :** 10.5.1~ynh1 +## Captures d’écran - -## Captures d'écran - -![](./doc/screenshots/screenshot1.png) +![Capture d’écran de OpenProject](./doc/screenshots/screenshot1.png) ## Avertissements / informations importantes * default user and password is admin / admin ## Documentations et ressources -* Site officiel de l'app : https://www.openproject.org/ -* Documentation officielle de l'admin : https://www.openproject.org/docs/ -* Dépôt de code officiel de l'app : https://github.com/opf/openproject -* Documentation YunoHost pour cette app : https://yunohost.org/app_openproject -* Signaler un bug : https://github.com/YunoHost-Apps/openproject_ynh/issues +* Site officiel de l’app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/openproject_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/openproject_ynh/tree/testing --debug ou sudo yunohost app upgrade openproject -u https://github.com/YunoHost-Apps/openproject_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From 81135ebd723cdca8a4af5f1c8e83e3ab3a297a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 26 May 2023 09:34:39 +0200 Subject: [PATCH 03/15] v2 --- check_process | 25 ------- doc/DESCRIPTION.md | 5 +- doc/{DISCLAIMER.md => POST_INSTALL.md} | 0 manifest.json | 55 --------------- manifest.toml | 36 ++++++---- scripts/_common.sh | 6 -- scripts/backup | 20 ------ scripts/change_url | 85 ---------------------- scripts/install | 97 -------------------------- scripts/remove | 38 ---------- scripts/restore | 52 +------------- scripts/upgrade | 70 ------------------- tests.toml | 7 ++ 13 files changed, 33 insertions(+), 463 deletions(-) delete mode 100644 check_process rename doc/{DISCLAIMER.md => POST_INSTALL.md} (100%) delete mode 100644 manifest.json create mode 100644 tests.toml diff --git a/check_process b/check_process deleted file mode 100644 index 2b53905..0000000 --- a/check_process +++ /dev/null @@ -1,25 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - language="en" - is_public=1 - ; Checks - pkg_linter=1 - setup_sub_dir=0 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - #upgrade=1 from_commit=CommitHash - backup_restore=1 - multi_instance=0 - port_already_use=0 - change_url=1 -;;; Options -Email= -Notification=none -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index ada70da..18b9ea2 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1,5 +1,6 @@ -## Overview -OpenProject is a web-based project management software. Its key features are: +OpenProject is a web-based project management software. + +### Features - Project planning and scheduling - Product roadmap and release planning diff --git a/doc/DISCLAIMER.md b/doc/POST_INSTALL.md similarity index 100% rename from doc/DISCLAIMER.md rename to doc/POST_INSTALL.md diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 64638c2..0000000 --- a/manifest.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "OpenProject", - "id": "openproject", - "packaging_format": 1, - "description": { - "en": "web-based project management software" - }, - "version": "10.5.1~ynh1", - "url": "https://www.openproject.org/", - "upstream": { - "license": "GPL-3.0-or-later", - "website": "https://www.openproject.org/", - "admindoc": "https://www.openproject.org/docs/", - "code": "https://github.com/opf/openproject" - }, - "license": "GPL-3.0-or-later", - "maintainer": { - "name": "Moutonjr \"Geoff\"", - "email": "Moutonjr[at]jserv.fr", - "url": "http://jserv.fr" - }, - "requirements": { - "yunohost": ">= 4.3.0" - }, - "multi_instance": false, - "services": [ - "nginx" - ], - "arguments": { - "install": [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "is_public", - "type": "boolean", - "default": true, - "help": { - "en": "A public Openproject app could be less secure depending your configuration. Butit can allow external people from your Yunohost instance to participate to project management." - } - }, - { - "name": "language", - "type": "string", - "ask": { - "en": "Choose the application language", - "fr": "Choisissez la langue de l'application" - }, - "choices": ["fr", "en"], - "default": "en" - } - ] - } -} diff --git a/manifest.toml b/manifest.toml index 4ef4ad4..d536ebd 100644 --- a/manifest.toml +++ b/manifest.toml @@ -13,22 +13,19 @@ license = "GPL-3.0-or-later" website = "https://www.openproject.org/" admindoc = "https://www.openproject.org/docs/" code = "https://github.com/opf/openproject" -cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number) -fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. [integration] -yunohost = ">= 4.3.0" -architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"] +yunohost = ">= 11.1.19" +architectures = "all" multi_instance = false -ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials. -sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal. -disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... -ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... -ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ldap = false +sso = false +disk = "50M" +ram.build = "50M" +ram.runtime = "50M" [install] [install.domain] - # this is a generic question - ask strings are automatically handled by Yunohost's core type = "domain" full_domain = true @@ -45,16 +42,27 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen default = "en" [resources] + + [resources.ports] + [resources.system_user] [resources.install_dir] [resources.permissions] main.url = "/" - [[resources.apt.extras]] - repo = "deb https://dl.packager.io/srv/deb/opf/openproject/stable/$PROJECT_VERSION/debian $debian_release main" - key = "https://dl.packager.io/srv/opf/openproject/key" - packages = "#FIXME#$extra_pkg_dependencies" + api.url = "/api" + api.allowed = "visitors" + api.auth_header = false + api.show_tile = false + api.protected = true + + [resources.apt] + packages = "apt-transport-https memcached postgresql postgresql-common" + + extras.openproject.repo = "deb https://dl.packager.io/srv/deb/opf/openproject/stable/12/debian bullseye main" + extras.openproject.key = "https://dl.packager.io/srv/opf/openproject/key" + extras.openproject.packages = "openproject" [resources.database] type = "postgresql" diff --git a/scripts/_common.sh b/scripts/_common.sh index b278e98..944a65e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,12 +4,6 @@ # COMMON VARIABLES #================================================= -PROJECT_VERSION=12 - -# dependencies used by the app -#REMOVEME? pkg_dependencies="apt-transport-https memcached postgresql postgresql-common" -#REMOVEME? extra_pkg_dependencies="openproject" - #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index a22d8a6..9531293 100755 --- a/scripts/backup +++ b/scripts/backup @@ -10,26 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - true -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_print_info --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= diff --git a/scripts/change_url b/scripts/change_url index e475f1b..8cb353c 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -9,60 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -#REMOVEME? old_domain=$YNH_APP_OLD_DOMAIN -#REMOVEME? old_path=$YNH_APP_OLD_PATH - -#REMOVEME? new_domain=$YNH_APP_NEW_DOMAIN -#REMOVEME? new_path="/" - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." - -#REMOVEME? # Needed for helper "ynh_add_nginx_config" -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) - -#================================================= -# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP -#================================================= -#REMOVEME? ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." - -# Backup the current version of the app -#REMOVEME? ynh_backup_before_upgrade -#REMOVEME? ynh_clean_setup () { - #REMOVEME? ynh_clean_check_starting - # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. -#REMOVEME? ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - - # Restore it if the upgrade fails -#REMOVEME? ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# CHECK WHICH PARTS SHOULD BE CHANGED -#================================================= - -#REMOVEME? change_domain=0 -#REMOVEME? if [ "$old_domain" != "$new_domain" ] -then - #REMOVEME? change_domain=1 -fi - -#REMOVEME? change_path=0 -#REMOVEME? if [ "$old_path" != "$new_path" ] -then - #REMOVEME? change_path=1 -fi - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -79,30 +25,6 @@ ynh_script_progression --message="Updating NGINX web server configuration..." ynh_change_url_nginx_config -#REMOVEME? nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf - -# Change the path in the NGINX config file -if [ $change_path -eq 1 ] -then - # Make a backup of the original NGINX config file if modified -#REMOVEME? ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for NGINX helper -#REMOVEME? domain="$old_domain" -#REMOVEME? path="$new_path" - # Create a dedicated NGINX config -#REMOVEME? ynh_add_nginx_config -fi - -# Change the domain for NGINX -if [ $change_domain -eq 1 ] -then - # Delete file checksum for the old conf file location -#REMOVEME? ynh_delete_file_checksum --file="$nginx_conf_path" -#REMOVEME? mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf - # Store file checksum for the new config file location -#REMOVEME? ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" -fi - #================================================= # GENERIC FINALISATION #================================================= @@ -113,13 +35,6 @@ ynh_script_progression --message="Starting a systemd service..." # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" -#================================================= -# RELOAD NGINX -#================================================= -#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." - -#REMOVEME? #REMOVEME? ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index 5ef207f..5f9b285 100755 --- a/scripts/install +++ b/scripts/install @@ -9,89 +9,14 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - ynh_clean_check_starting -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -#REMOVEME? domain=$YNH_APP_ARG_DOMAIN -path="/" -#REMOVEME? is_public=$YNH_APP_ARG_IS_PUBLIC -#REMOVEME? language=$YNH_APP_ARG_LANGUAGE - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - # Installer variables _homedir="/var/$app/" - -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -#REMOVEME? ynh_script_progression --message="Validating installation parameters..." - -# Register (book) web path -#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -#REMOVEME? ynh_script_progression --message="Storing installation settings..." - -#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain -#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path -ynh_app_setting_set --app=$app --key=language --value=$language ynh_app_setting_set --app=$app --key=_homedir --value=$_homedir -#================================================= -# STANDARD MODIFICATIONS -#================================================= -# FIND AND OPEN A PORT -#================================================= -#REMOVEME? ynh_script_progression --message="Finding an available port..." - -# Find an available port -#REMOVEME? port=$(ynh_find_port --port=8095) -#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port - -#================================================= -# INSTALL DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Installing OpenProject & its dependencies..." - -debian_release=$(lsb_release -r -s) -#REMOVEME? ynh_install_app_dependencies $pkg_dependencies -#REMOVEME? ynh_install_extra_app_dependencies --repo="deb https://dl.packager.io/srv/deb/opf/openproject/stable/$PROJECT_VERSION/debian $debian_release main" --package="$extra_pkg_dependencies" --key="https://dl.packager.io/srv/opf/openproject/key" - -#================================================= -# CREATE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Configuring system user..." - -# Create a system user -#REMOVEME? ynh_system_user_create --username=$app - -#================================================= -# CREATE A POSTGRESQL DATABASE -#================================================= -#REMOVEME? ynh_script_progression --message="Creating a PostgreSQL database..." - -#REMOVEME? ynh_psql_test_if_first_run - -#REMOVEME? db_name=$(ynh_sanitize_dbid --db_name=$app) -#REMOVEME? db_user=$db_name -#REMOVEME? ynh_app_setting_set --app=$app --key=db_name --value=$db_name -#REMOVEME? ynh_psql_setup_db --db_user=$db_user --db_name=$db_name -#REMOVEME? db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) - #================================================= # NGINX CONFIGURATION #================================================= @@ -163,28 +88,6 @@ ynh_script_progression --message="Starting a systemd service..." # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" -#================================================= -# SETUP SSOWAT -#================================================= -#REMOVEME? ynh_script_progression --message="Configuring permissions..." - -# Make app public if necessary -#REMOVEME? if [ $is_public -eq 1 ] -then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. -#REMOVEME? ynh_permission_update --permission="main" --add="visitors" -fi - -#REMOVEME? ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" - -#================================================= -# RELOAD NGINX -#================================================= -#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." - -#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index 7906517..51cbecc 100755 --- a/scripts/remove +++ b/scripts/remove @@ -9,18 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#REMOVEME? db_user=$db_name -#REMOVEME? _homedir=$(ynh_app_setting_get --app=$app --key=_homedir) - #================================================= # STANDARD REMOVE #================================================= @@ -42,14 +30,6 @@ ynh_script_progression --message="Stopping and removing the systemd service..." # Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE THE POSTGRESQL DATABASE -#================================================= -#REMOVEME? ynh_script_progression --message="Removing the PostgreSQL database..." - -# Remove a database if it exists, along with the associated user -#REMOVEME? ynh_psql_remove_db --db_user=$db_user --db_name=$db_name - #================================================= # REMOVE NGINX CONFIGURATION #================================================= @@ -58,14 +38,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Removing dependencies..." - -# Remove metapackage and its dependencies -#REMOVEME? ynh_remove_app_dependencies - #================================================= # SPECIFIC REMOVE #================================================= @@ -78,16 +50,6 @@ ynh_secure_remove --file="$_homedir" # Remove a directory securely ynh_secure_remove --file="/etc/$app" -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." - -# Delete a system user -#REMOVEME? ynh_system_user_delete --username=$app - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index bd9fa33..f0ea451 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,34 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - ynh_clean_check_starting -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) -#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#REMOVEME? db_user=$db_name -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) - -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." - #================================================= # STANDARD RESTORATION STEPS #================================================= @@ -47,33 +19,11 @@ ynh_script_progression --message="Restoring the NGINX web server configuration.. ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." - -# Create the dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app - -#================================================= -# SPECIFIC RESTORATION -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Reinstalling dependencies..." - -debian_release=$(lsb_release -r -s) -#REMOVEME? ynh_install_app_dependencies $pkg_dependencies -#REMOVEME? ynh_install_extra_app_dependencies --repo="deb https://dl.packager.io/srv/deb/opf/openproject/stable/$PROJECT_VERSION/debian $debian_release main" --package="$extra_pkg_dependencies" --key="https://dl.packager.io/srv/opf/openproject/key" - #================================================= # RESTORE THE POSTGRESQL DATABASE #================================================= -#REMOVEME? ynh_script_progression --message="Restoring the PostgreSQL database..." +ynh_script_progression --message="Restoring the PostgreSQL database..." -#REMOVEME? db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) -#REMOVEME? ynh_psql_test_if_first_run -#REMOVEME? ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a286adc..91abf1e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,41 +9,12 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) -#REMOVEME? language=$(ynh_app_setting_get --app=$app --key=language) -#REMOVEME? db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) - #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." - -# Backup the current version of the app -#REMOVEME? ynh_backup_before_upgrade -#REMOVEME? ynh_clean_setup () { - ynh_clean_check_starting - # Restore it if the upgrade fails -#REMOVEME? ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -53,31 +24,6 @@ ynh_script_progression --message="Stopping a systemd service..." ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." - -# Cleaning legacy permissions -#REMOVEME? if ynh_legacy_permissions_exists; then -#REMOVEME? ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi - -# Create a permission if needed -#REMOVEME? if ! ynh_permission_exists --permission="api"; then -#REMOVEME? ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" -fi - -#================================================= -# CREATE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." - -# Create a dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app - #================================================= # NGINX CONFIGURATION #================================================= @@ -86,15 +32,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." - -debian_release=$(lsb_release -r -s) -#REMOVEME? ynh_install_app_dependencies $pkg_dependencies -#REMOVEME? ynh_install_extra_app_dependencies --repo="deb https://dl.packager.io/srv/deb/opf/openproject/stable/$PROJECT_VERSION/debian $debian_release main" --package="$extra_pkg_dependencies" --key="https://dl.packager.io/srv/opf/openproject/key" - #================================================= # GENERIC FINALIZATION #================================================= @@ -111,13 +48,6 @@ ynh_script_progression --message="Starting a systemd service..." ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" -#================================================= -# RELOAD NGINX -#================================================= -#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." - -#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..91daf17 --- /dev/null +++ b/tests.toml @@ -0,0 +1,7 @@ +test_format = 1.0 + +[default] + + # ------------ + # Tests to run + # ------------ \ No newline at end of file From e6b2ea0dd6b23b74f00a820c964f9f79749396c1 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 26 May 2023 07:34:49 +0000 Subject: [PATCH 04/15] Auto-update README --- README.md | 8 +++----- README_fr.md | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index cc57d62..cdaa5af 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,9 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -## Overview -OpenProject is a web-based project management software. Its key features are: +OpenProject is a web-based project management software. + +### Features - Project planning and scheduling - Product roadmap and release planning @@ -36,9 +37,6 @@ OpenProject is a web-based project management software. Its key features are: ![Screenshot of OpenProject](./doc/screenshots/screenshot1.png) -## Disclaimers / important information - -* default user and password is admin / admin ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index 9412597..3d3f2e2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,8 +16,9 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -## Overview -OpenProject is a web-based project management software. Its key features are: +OpenProject is a web-based project management software. + +### Features - Project planning and scheduling - Product roadmap and release planning @@ -36,9 +37,6 @@ OpenProject is a web-based project management software. Its key features are: ![Capture d’écran de OpenProject](./doc/screenshots/screenshot1.png) -## Avertissements / informations importantes - -* default user and password is admin / admin ## Documentations et ressources * Site officiel de l’app : From ea447474bc1fad7bdf7ba19e14915393689f7d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 26 May 2023 09:35:37 +0200 Subject: [PATCH 05/15] Update manifest.toml --- manifest.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index d536ebd..38af49b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -2,7 +2,8 @@ packaging_format = 2 id = "openproject" name = "OpenProject" -description.en = "web-based project management software" +description.en = "Web-based project management software" +description.fr = "Logiciel de gestion de projet basé sur le web" version = "10.5.1~ynh1" From eb1836467086d632be7a89f0285e33ed2636a930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 26 May 2023 09:38:34 +0200 Subject: [PATCH 06/15] Update manifest.toml --- manifest.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 38af49b..48519fb 100644 --- a/manifest.toml +++ b/manifest.toml @@ -31,7 +31,8 @@ ram.runtime = "50M" full_domain = true [install.init_main_permission] - help.en = "A public Openproject app could be less secure depending your configuration. Butit can allow external people from your Yunohost instance to participate to project management." + help.en = "Set to visitors, Openproject could be less secure depending on your configuration, but it can allow visitors to participate to project management." + help.fr = "Réglée sur visiteurs, Openproject peut être moins sécurisée en fonction de votre configuration, mais elle peut permettre aux visiteurs de participer à la gestion du projet." type = "group" default = "visitors" From 40eff72fcdcfd5041816c24e1deeabd7ca405f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 26 May 2023 10:19:07 +0200 Subject: [PATCH 07/15] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 48519fb..602bc11 100644 --- a/manifest.toml +++ b/manifest.toml @@ -62,7 +62,7 @@ ram.runtime = "50M" [resources.apt] packages = "apt-transport-https memcached postgresql postgresql-common" - extras.openproject.repo = "deb https://dl.packager.io/srv/deb/opf/openproject/stable/12/debian bullseye main" + extras.openproject.repo = "deb https://dl.packager.io/srv/deb/opf/openproject/stable/12/debian 11 main" extras.openproject.key = "https://dl.packager.io/srv/opf/openproject/key" extras.openproject.packages = "openproject" From b589c5c519a45b56633cc1f75fe0ab3ae40d3cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 26 May 2023 11:21:33 +0200 Subject: [PATCH 08/15] fix --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 5f9b285..b8c7775 100755 --- a/scripts/install +++ b/scripts/install @@ -78,7 +78,7 @@ openproject configure >> "$YNH_STDINFO" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app +yunohost service add $app --description="Web-based project management software" --log="systemd" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/restore b/scripts/restore index f0ea451..13e978e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -49,7 +49,7 @@ openproject configure >> "$YNH_STDINFO" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app +--description="Web-based project management software" --log="systemd" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 91abf1e..58d2b2a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,7 +39,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app +--description="Web-based project management software" --log="systemd" #================================================= # START SYSTEMD SERVICE From 2183dc4ff615e311f8c71598bf7b62432603ec61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 26 May 2023 11:26:10 +0200 Subject: [PATCH 09/15] cleaning --- manifest.toml | 2 +- scripts/backup | 2 +- scripts/remove | 2 +- scripts/restore | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index 602bc11..88f2cd5 100644 --- a/manifest.toml +++ b/manifest.toml @@ -22,7 +22,7 @@ multi_instance = false ldap = false sso = false disk = "50M" -ram.build = "50M" +ram.build = "800M" ram.runtime = "50M" [install] diff --git a/scripts/backup b/scripts/backup index 9531293..c4104ea 100755 --- a/scripts/backup +++ b/scripts/backup @@ -27,7 +27,7 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" # BACKUP VARIOUS FILES #================================================= -ynh_backup --src_path="/etc/$app/" +ynh_backup --src_path="/etc/openproject/" #================================================= # BACKUP THE POSTGRESQL DATABASE diff --git a/scripts/remove b/scripts/remove index 51cbecc..9852dd5 100755 --- a/scripts/remove +++ b/scripts/remove @@ -48,7 +48,7 @@ ynh_script_progression --message="Removing various files..." ynh_secure_remove --file="$_homedir" # Remove a directory securely -ynh_secure_remove --file="/etc/$app" +ynh_secure_remove --file="/etc/openproject" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 13e978e..46945a5 100755 --- a/scripts/restore +++ b/scripts/restore @@ -31,7 +31,7 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name #================================================= ynh_script_progression --message="Restoring various files..." -ynh_restore_file --origin_path="/etc/$app/" +ynh_restore_file --origin_path="/etc/openproject/" chmod 750 "/etc/openproject/" chmod -R o-rwx "/etc/openproject/" From 60150d5de6dd0939ae39f05c946c8c98cfdcab0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 26 May 2023 11:28:41 +0200 Subject: [PATCH 10/15] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 88f2cd5..81e8fe6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "OpenProject" description.en = "Web-based project management software" description.fr = "Logiciel de gestion de projet basé sur le web" -version = "10.5.1~ynh1" +version = "10.5.1~ynh2" maintainers = ["Moutonjr \"Geoff\""] From fddca4256d9efd81c623cec240df5e549e2c1391 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 26 May 2023 09:28:45 +0000 Subject: [PATCH 11/15] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cdaa5af..90f2040 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ OpenProject is a web-based project management software. - Meeting agendas and meeting minutes -**Shipped version:** 10.5.1~ynh1 +**Shipped version:** 10.5.1~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 3d3f2e2..7043f6e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,7 +31,7 @@ OpenProject is a web-based project management software. - Meeting agendas and meeting minutes -**Version incluse :** 10.5.1~ynh1 +**Version incluse :** 10.5.1~ynh2 ## Captures d’écran From 5e3ecde9fccbae7eeae2704b6ed950fd89d33719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 26 May 2023 11:32:13 +0200 Subject: [PATCH 12/15] Update install --- scripts/install | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index b8c7775..9798e84 100755 --- a/scripts/install +++ b/scripts/install @@ -64,12 +64,12 @@ chmod 750 "/etc/openproject/" chmod -R o-rwx "/etc/openproject/" chown -R $app:$app "/etc/openproject/" -openproject config:set PORT=$port -openproject config:set SERVER_PROTOCOL_FORCE_HTTPS="true" -openproject config:set SERVER_HOSTNAME=$domain -openproject config:set SERVER_PATH_PREFIX=$path +ynh_exec_warn_less openproject config:set PORT=$port +ynh_exec_warn_less openproject config:set SERVER_PROTOCOL_FORCE_HTTPS="true" +ynh_exec_warn_less openproject config:set SERVER_HOSTNAME=$domain +ynh_exec_warn_less openproject config:set SERVER_PATH_PREFIX=$path -openproject configure >> "$YNH_STDINFO" +ynh_exec_warn_less openproject configure >> "$YNH_STDINFO" #================================================= # GENERIC FINALIZATION From 819988996a6004e6812aa44f46bc6fd2f035cd0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 26 May 2023 11:37:49 +0200 Subject: [PATCH 13/15] fix --- scripts/restore | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 46945a5..7762d2f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -49,7 +49,7 @@ openproject configure >> "$YNH_STDINFO" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." ---description="Web-based project management software" --log="systemd" +yunohost service add $app --description=Web-based project management software --log=systemd #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 58d2b2a..59e0626 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,7 +39,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Integrating service in YunoHost..." ---description="Web-based project management software" --log="systemd" +yunohost service add $app --description=Web-based project management software --log=systemd #================================================= # START SYSTEMD SERVICE From 9c04c2115bca678375d80f4e2ae757502099a0df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 26 May 2023 13:32:27 +0200 Subject: [PATCH 14/15] fix --- scripts/restore | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 7762d2f..87280dd 100755 --- a/scripts/restore +++ b/scripts/restore @@ -49,7 +49,7 @@ openproject configure >> "$YNH_STDINFO" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description=Web-based project management software --log=systemd +yunohost service add $app --description="Web-based project management software" --log=systemd #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 59e0626..d11989f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,7 +39,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description=Web-based project management software --log=systemd +yunohost service add $app --description="Web-based project management software" --log=systemd #================================================= # START SYSTEMD SERVICE From 1c8ded12ca17d1d8dfd79ed0a42ff0af5391d396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 26 May 2023 13:55:57 +0200 Subject: [PATCH 15/15] Update restore --- scripts/restore | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/restore b/scripts/restore index 87280dd..50748bc 100755 --- a/scripts/restore +++ b/scripts/restore @@ -37,12 +37,12 @@ chmod 750 "/etc/openproject/" chmod -R o-rwx "/etc/openproject/" chown -R $app:$app "/etc/openproject/" -openproject config:set PORT=$port -openproject config:set SERVER_PROTOCOL_FORCE_HTTPS="true" -openproject config:set SERVER_HOSTNAME=$domain -openproject config:set SERVER_PATH_PREFIX=$path +ynh_exec_warn_less openproject config:set PORT=$port +ynh_exec_warn_less openproject config:set SERVER_PROTOCOL_FORCE_HTTPS="true" +ynh_exec_warn_less openproject config:set SERVER_HOSTNAME=$domain +ynh_exec_warn_less openproject config:set SERVER_PATH_PREFIX=$path -openproject configure >> "$YNH_STDINFO" +ynh_exec_warn_less openproject configure >> "$YNH_STDINFO" #================================================= # INTEGRATE SERVICE IN YUNOHOST