diff --git a/README.md b/README.md index 72a567d..0f5f3a7 100755 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Focalboard is a project management tool that helps define, organize, track and manage work across teams, using a familiar kanban board view. -**Shipped version:** 7.9.0~ynh1 +**Shipped version:** 7.9.0~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 5589723..cd8ab97 100755 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Focalboard est un outil de gestion de projet qui aide à définir, organiser, suivre et gérer le travail entre les équipes, à l'aide d'une vue de tableau kanban familière. -**Version incluse :** 7.9.0~ynh1 +**Version incluse :** 7.9.0~ynh2 ## Captures d’écran diff --git a/conf/app.src b/conf/app.src deleted file mode 100755 index 2e1253d..0000000 --- a/conf/app.src +++ /dev/null @@ -1,6 +0,0 @@ -SOURCE_URL=https://github.com/mattermost/focalboard/releases/download/v7.9.0/focalboard-server-linux-amd64.tar.gz -SOURCE_SUM=0785c65bd1e78d378bef2fdc2154a5928b23a336ae8e5568c441163e6ed89cda -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_EXTRACT=true diff --git a/conf/systemd.service b/conf/systemd.service index cba7645..1d1515e 100755 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Focalboard server +Description=Focalboard: kanban board [Service] Type=simple diff --git a/config_panel.toml b/config_panel.toml index 3276f53..7e4d42a 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -13,4 +13,4 @@ services = ["__APP__"] yes = "true" no = "false" help = "Enable publishing boards for public access" - bind = "enablePublicSharedBoards:__FINALPATH__/config.json" + bind = "enablePublicSharedBoards:__INSTALL_DIR__/config.json" diff --git a/manifest.toml b/manifest.toml index 0b5aa59..95d5964 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Focalboard" description.en = "Kanban project management software" description.fr = "Logiciel de gestion de projet Kanban" -version = "7.9.0~ynh1" +version = "7.9.0~ynh2" maintainers = ["eric_G"] @@ -17,7 +17,7 @@ userdoc = "https://www.focalboard.com/guide/user/" code = "https://github.com/mattermost/focalboard" [integration] -yunohost = ">= 11.1.13" +yunohost = ">= 11.1.15" architectures = ["amd64"] multi_instance = false ldap = false @@ -38,6 +38,12 @@ ram.runtime = "50M" default = "visitors" [resources] + + [resources.sources] + [resources.sources.main] + url = "https://github.com/mattermost/focalboard/releases/download/v7.9.0/focalboard-server-linux-amd64.tar.gz" + sha256 = "0785c65bd1e78d378bef2fdc2154a5928b23a336ae8e5568c441163e6ed89cda" + [resources.ports] [resources.system_user] @@ -51,6 +57,7 @@ ram.runtime = "50M" api.url = "/api" api.show_tile = false api.allowed = "visitors" + api.auth_header = false [resources.apt] packages = "postgresql" diff --git a/scripts/install b/scripts/install index a702a31..af100a3 100755 --- a/scripts/install +++ b/scripts/install @@ -14,7 +14,6 @@ enable_public_boards="false" #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." --weight=5 ynh_app_setting_set --app=$app --key=enable_public_boards --value=$enable_public_boards @@ -30,34 +29,27 @@ chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= -# NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=2 +ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=3 - # Create a dedicated systemd config ynh_add_systemd_config +yunohost service add $app --description="Self-hosted kanban board" --log="/var/log/$app/$app.log" + #================================================= # ADD A CONFIGURATION #================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" + chmod 600 $install_dir/config.json - -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=4 - -yunohost service add $app --description="Self-hosted kanban board" --log="/var/log/$app/$app.log" +chown $app:$app "$install_dir/config.json" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/remove b/scripts/remove index 733649f..09a33e8 100755 --- a/scripts/remove +++ b/scripts/remove @@ -10,10 +10,11 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# STANDARD REMOVE +# REMOVE SYSTEM CONFIGURATIONS #================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEMD SERVICE #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null @@ -22,19 +23,9 @@ 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 NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 - # Remove the dedicated NGINX config ynh_remove_nginx_config diff --git a/scripts/restore b/scripts/restore index 0052700..a0e9b50 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,14 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -45,33 +37,27 @@ ynh_script_progression --message="Restoring the PostgreSQL database..." --weight ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name #================================================= -# RESTORE SYSTEMD +# RESTORE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 +# RESTORE THE PHP-FPM CONFIGURATION +#================================================= +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/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="Self-hosted kanban board" --log="/var/log/$app/$app.log" -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 - -ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log" - #================================================= # GENERIC FINALIZATION #================================================= -# RELOAD NGINX AND PHP-FPM +# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=2 +ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 + +ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 05e48e7..dc8d6b6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -if [ -z "$enable_public_boards" ]; then +if [ -z "${enable_public_boards:-}" ]; then enable_public_boards="false" ynh_app_setting_set --app=$app --key=enable_public_boards --value=$enable_public_boards fi @@ -64,36 +64,28 @@ chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= -# NGINX CONFIGURATION +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# MODIFY A CONFIG FILE -#================================================= -ynh_script_progression --message="Modifying a config file..." - -ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" -chmod 600 $install_dir/config.json - -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 - # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="Self-hosted kanban board" --log="/var/log/$app/$app.log" +#================================================= +# MODIFY A CONFIG FILE +#================================================= +ynh_script_progression --message="Modifying a config file..." --weight=1 + +ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" + +chmod 600 "$install_dir/config.json" +chown $app:$app "$install_dir/config.json" + #================================================= # START SYSTEMD SERVICE #=================================================