mirror of
https://github.com/YunoHost-Apps/yeswiki_ynh.git
synced 2024-09-03 18:05:56 +02:00
Merge pull request #28 from YunoHost-Apps/testing
Update to 2021-05-05-2 with added permission upgrades
This commit is contained in:
commit
096cfd53ce
11 changed files with 50 additions and 75 deletions
|
@ -1,7 +1,7 @@
|
||||||
# YesWiki for YunoHost
|
# YesWiki for YunoHost
|
||||||
|
|
||||||
[![Integration level](https://dash.yunohost.org/integration/yeswiki.svg)](https://dash.yunohost.org/appci/app/yeswiki) ![](https://ci-apps.yunohost.org/ci/badges/yeswiki.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/yeswiki.maintain.svg)
|
[![Integration level](https://dash.yunohost.org/integration/yeswiki.svg)](https://dash.yunohost.org/appci/app/yeswiki) ![](https://ci-apps.yunohost.org/ci/badges/yeswiki.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/yeswiki.maintain.svg)
|
||||||
[![Install YesWiki with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=yeswiki)
|
[![Install YesWiki with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=yeswiki)
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ However, with a YesWiki we can build a website with multiple uses:
|
||||||
- Communicate information flows
|
- Communicate information flows
|
||||||
- Cultivate a bit of freedom...
|
- Cultivate a bit of freedom...
|
||||||
|
|
||||||
**Shipped version:** Doryphore 2021-04-06-2
|
**Shipped version:** Doryphore 2021-05-05-2
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# YesWiki pour YunoHost
|
# YesWiki pour YunoHost
|
||||||
|
|
||||||
[![Niveau d'intégration](https://dash.yunohost.org/integration/yeswiki.svg)](https://dash.yunohost.org/appci/app/yeswiki) ![](https://ci-apps.yunohost.org/ci/badges/yeswiki.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/yeswiki.maintain.svg)
|
[![Niveau d'intégration](https://dash.yunohost.org/integration/yeswiki.svg)](https://dash.yunohost.org/appci/app/yeswiki) ![](https://ci-apps.yunohost.org/ci/badges/yeswiki.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/yeswiki.maintain.svg)
|
||||||
[![Installer YesWiki avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=yeswiki)
|
[![Installer YesWiki avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=yeswiki)
|
||||||
|
|
||||||
*[Read this readme in english.](./README.md)*
|
*[Read this readme in english.](./README.md)*
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ Néanmoins, avec un YesWiki on peut fabriquer un site internet aux usages multip
|
||||||
- Faire communiquer des flux d'informations
|
- Faire communiquer des flux d'informations
|
||||||
- Cultiver un bout de liberté...
|
- Cultiver un bout de liberté...
|
||||||
|
|
||||||
**Version incluse :** Doryphore 2021-04-06-2
|
**Version incluse :** Doryphore 2021-05-05-2
|
||||||
|
|
||||||
## Captures d'écran
|
## Captures d'écran
|
||||||
|
|
||||||
|
|
|
@ -24,20 +24,17 @@
|
||||||
setup_private=1
|
setup_private=1
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
upgrade=1 from_commit=e530bfcf7508e42be1b73ff0dcac8ed72428381b
|
upgrade=1 from_commit=17bab2335903bce80a89002d49f00e35de77a1f3
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
port_already_use=1 (66)
|
port_already_use=1 (66)
|
||||||
change_url=1
|
change_url=1
|
||||||
actions=0
|
actions=0
|
||||||
config_panel=0
|
config_panel=0
|
||||||
;;; Levels
|
|
||||||
# If the level 5 (Package linter) is forced to 1. Please add justifications here.
|
|
||||||
Level 5=auto
|
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
Notification=change
|
Notification=change
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=e530bfcf7508e42be1b73ff0dcac8ed72428381b
|
; commit=17bab2335903bce80a89002d49f00e35de77a1f3
|
||||||
name=Name of this previous version
|
name=Update readmes with LDAP integration info
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=password&is_public=1&
|
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=password&is_public=1&
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://repository.yeswiki.net/doryphore/yeswiki-doryphore-2021-04-06-2.zip
|
SOURCE_URL=https://repository.yeswiki.net/doryphore/yeswiki-doryphore-2021-05-05-2.zip
|
||||||
SOURCE_SUM=44b225e9dff99a415ff72e1d02225ac8
|
SOURCE_SUM=1fd7e0a19aa88f53ea5a98741866c039
|
||||||
SOURCE_SUM_PRG=md5sum
|
SOURCE_SUM_PRG=md5sum
|
||||||
SOURCE_FORMAT=zip
|
SOURCE_FORMAT=zip
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -9,7 +9,6 @@ location __PATH__/ {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
}
|
||||||
|
|
||||||
### Example PHP configuration (remove it if not used)
|
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
|
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
|
||||||
|
@ -26,7 +25,6 @@ location __PATH__/ {
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||||
}
|
}
|
||||||
### End of PHP configuration part
|
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
|
|
|
@ -6,16 +6,22 @@
|
||||||
"en": "Wiki that is quick and easy to use.",
|
"en": "Wiki that is quick and easy to use.",
|
||||||
"fr": "Wiki facile et rapide à prendre en main."
|
"fr": "Wiki facile et rapide à prendre en main."
|
||||||
},
|
},
|
||||||
"version": "2021-04-06-2~ynh1",
|
"version": "2021-05-05-2~ynh1",
|
||||||
"url": "https://yeswiki.net/",
|
"url": "https://yeswiki.net/",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"maintainer": {
|
"maintainer": [
|
||||||
"name": "Plumf",
|
{
|
||||||
"email": "plumf@open-plug.eu",
|
"name": "Nils Van Zuijlen",
|
||||||
"url": "https://www.plumf.eu"
|
"email": "nils.van-zuijlen@mailo.com"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Plumf",
|
||||||
|
"email": "plumf@open-plug.eu",
|
||||||
|
"url": "https://www.plumf.eu"
|
||||||
|
}
|
||||||
|
],
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 3.8.1"
|
"yunohost": ">= 4.1.2"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -13,6 +13,4 @@
|
||||||
|
|
||||||
## Package_check results
|
## Package_check results
|
||||||
---
|
---
|
||||||
*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results*
|
* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"*
|
||||||
|
|
||||||
[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/yeswiki_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/yeswiki_ynh%20PR-NUM-%20(USERNAME)/)
|
|
||||||
|
|
|
@ -29,11 +29,6 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||||
# Needed for helper "ynh_add_nginx_config"
|
# Needed for helper "ynh_add_nginx_config"
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
# Add settings here as needed by your application
|
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|
||||||
db_user=$db_name
|
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -52,9 +52,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
|
||||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||||
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
|
||||||
#ynh_app_setting_set --app=$app --key=wiki_name --value=$wiki_name
|
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -100,7 +97,7 @@ ynh_system_user_create --username=$app
|
||||||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=8
|
ynh_script_progression --message="Configuring PHP-FPM..." --weight=8
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
|
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -112,15 +109,10 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
# Set right permissions for cURL install
|
# Set right permissions for cURL install
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
|
|
||||||
# Set the app as temporarily public for curl call
|
# Set the app as temporarily public for cURL call
|
||||||
ynh_script_progression --message="Configuring SSOwat..." --weight=2
|
ynh_permission_update --permission="main" --add="visitors"
|
||||||
|
|
||||||
ynh_permission_update --permission main --remove all_users --add visitors
|
# Reload NGINX
|
||||||
|
|
||||||
# Reload SSOwat config
|
|
||||||
yunohost app ssowatconf
|
|
||||||
|
|
||||||
# Reload Nginx
|
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
# Installation with curl
|
# Installation with curl
|
||||||
|
@ -139,12 +131,6 @@ ynh_local_curl "/?PagePrincipale&installAction=install" "config[default_language
|
||||||
# authorization of html
|
# authorization of html
|
||||||
ynh_replace_string --match_string="'allow_raw_html' => false," --replace_string="'allow_raw_html' => true," --target_file="$final_path/wakka.config.php"
|
ynh_replace_string --match_string="'allow_raw_html' => false," --replace_string="'allow_raw_html' => true," --target_file="$final_path/wakka.config.php"
|
||||||
|
|
||||||
# Remove the public access
|
|
||||||
if [ $is_public -eq 0 ]
|
|
||||||
then
|
|
||||||
ynh_permission_update --permission main --remove visitors --add all_users
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD AND CONFIGURE LDAP PLUGIN
|
# DOWNLOAD AND CONFIGURE LDAP PLUGIN
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -182,15 +168,18 @@ ynh_replace_string --match_string=");"\
|
||||||
chown -R root: $final_path
|
chown -R root: $final_path
|
||||||
chown -R $app $final_path/{cache,files,themes,tools,wakka.config.php}
|
chown -R $app $final_path/{cache,files,themes,tools,wakka.config.php}
|
||||||
|
|
||||||
|
chown $app:www-data $final_path
|
||||||
|
chmod o-rwx $final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring SSOwat..." --weight=1
|
ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||||
|
|
||||||
# Make app public if necessary
|
# Make app public if necessary or protect it
|
||||||
if [ $is_public -eq 1 ]
|
if [ $is_public -eq 0 ]
|
||||||
then
|
then
|
||||||
ynh_permission_update --permission main --add visitors
|
ynh_permission_update --permission="main" --remove="visitors"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -75,6 +75,9 @@ ynh_system_user_create --username=$app
|
||||||
chown -R root: $final_path
|
chown -R root: $final_path
|
||||||
chown -R $app $final_path/{cache,files,themes,tools,wakka.config.php}
|
chown -R $app $final_path/{cache,files,themes,tools,wakka.config.php}
|
||||||
|
|
||||||
|
chown $app:www-data $final_path
|
||||||
|
chmod o-rwx $final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -82,7 +85,7 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=11
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
|
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
|
|
|
@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||||
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
language=$(ynh_app_setting_get --app=$app --key=language)
|
language=$(ynh_app_setting_get --app=$app --key=language)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
|
@ -36,15 +35,6 @@ upgrade_type=$(ynh_check_app_version_changed)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||||
|
|
||||||
# Fix is_public as a boolean value
|
|
||||||
if [ "$is_public" = "Yes" ]; then
|
|
||||||
ynh_app_setting_set --app=$app --key=is_public --value=1
|
|
||||||
is_public=1
|
|
||||||
elif [ "$is_public" = "No" ]; then
|
|
||||||
ynh_app_setting_set --app=$app --key=is_public --value=0
|
|
||||||
is_public=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If db_name doesn't exist, create it
|
# If db_name doesn't exist, create it
|
||||||
if [ -z "$db_name" ]; then
|
if [ -z "$db_name" ]; then
|
||||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||||
|
@ -57,6 +47,13 @@ if [ -z "$final_path" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Cleaning legacy permissions
|
||||||
|
if ynh_legacy_permissions_exists; then
|
||||||
|
ynh_legacy_permissions_delete_all
|
||||||
|
|
||||||
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -141,7 +138,7 @@ ynh_system_user_create --username=$app
|
||||||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=5
|
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=5
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
|
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
@ -153,16 +150,8 @@ ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependenc
|
||||||
chown -R root: $final_path
|
chown -R root: $final_path
|
||||||
chown -R $app $final_path/{cache,files,themes,tools,wakka.config.php}
|
chown -R $app $final_path/{cache,files,themes,tools,wakka.config.php}
|
||||||
|
|
||||||
#=================================================
|
chown $app:www-data $final_path
|
||||||
# SETUP SSOWAT
|
chmod o-rwx $final_path
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1
|
|
||||||
# Make app public if necessary
|
|
||||||
#if [ $is_public -eq 1 ]
|
|
||||||
#then
|
|
||||||
# unprotected_uris allows SSO credentials to be passed anyway
|
|
||||||
#ynh_permission_update --permission main --remove all_users --add visitors
|
|
||||||
#fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Reference in a new issue