Skip to content

Commit d1764f4

Browse files
Testing (#132)
* restart config panel * Update manifest.toml * Standard (#119) * fix * Update manifest.toml * Update manifest.toml * Update POST_INSTALL.md * Update POST_INSTALL_fr.md * fix * Update manifest.toml * Auto-update README * Update tests.toml * Update tests.toml * remove standard * Update manifest.toml * Auto-update README * Update tests.toml * Update manifest.toml * Update manifest.toml * Update install * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README * cleaning * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README * Upgrade to v23.6.2 (#128) * Upgrade to v23.6.2 * Auto-update README * Auto-update README * Update manifest.toml * Add maintenance * Update config_panel.toml * Update config * Update config_panel.toml * Update config * Update manifest.toml * Update config * Update config * fix * Update manifest.toml * Auto-update README --------- Co-authored-by: yunohost-bot <[email protected]> Co-authored-by: YunoHost Bot <[email protected]>
1 parent d615c70 commit d1764f4

File tree

5 files changed

+39
-6
lines changed

5 files changed

+39
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ BookStack is an opinionated wiki system that provides a pleasant and simple out
2929
- Diagrams.net Integration
3030

3131

32-
**Shipped version:** 23.06.2~ynh1
32+
**Shipped version:** 23.06.2~ynh2
3333

3434
**Demo:** https://demo.bookstackapp.com
3535

README_fr.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ BookStack est un système wiki simple prête à l'emploi. Les nouveaux utilisate
2727
- Multilingue
2828

2929

30-
**Version incluse :** 23.06.2~ynh1
30+
**Version incluse :** 23.06.2~ynh2
3131

3232
**Démo :** https://demo.bookstackapp.com
3333

config_panel.toml renamed to config_panel.toml.example

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ version = "1.0"
22

33
[main]
44
name = "BookStack configuration"
5+
services = ["__APP__"]
6+
7+
[main.maintenance_mode]
8+
name = "Maintenance mode"
9+
10+
[main.maintenance_mode.maintenance_mode]
11+
ask = "Enable maintenance mode"
12+
type = "boolean"
13+
default = "0"
514

615
[main.php_fpm_config]
716
name = "PHP-FPM configuration"

manifest.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name = "BookStack"
55
description.en = "Platform to create documentation/wiki content"
66
description.fr = "Plateforme pour créer du contenu de documentation/wiki"
77

8-
version = "23.06.2~ynh1"
8+
version = "23.06.2~ynh2"
99

1010
maintainers = ["eric_G"]
1111

@@ -18,7 +18,7 @@ userdoc = "https://www.bookstackapp.com/docs/user/"
1818
code = "https://github.com/BookStackApp/BookStack"
1919

2020
[integration]
21-
yunohost = ">= 11.1.21"
21+
yunohost = ">= 11.2"
2222
architectures = "all"
2323
multi_instance = true
2424
ldap = true
@@ -46,8 +46,8 @@ ram.runtime = "50M"
4646
default = "en"
4747

4848
[install.init_main_permission]
49-
help.en = "If enabled, BookStack will be accessible by people who do not have an account. This can be changed later via the webadmin."
50-
help.fr = "Si cette case est cochée, BookStack sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
49+
help.en = "Si défini sur visiteurs, BookStack will be accessible by people who do not have an account. This can be changed later via the webadmin."
50+
help.fr = "Si visiteurs selectionné, BookStack sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
5151
type = "group"
5252
default = "visitors"
5353

scripts/config

+24
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ current_fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
2222
# SPECIFIC GETTERS FOR TOML SHORT KEY
2323
#=================================================
2424

25+
get__maintenance_mode() {
26+
# Maintenance mode status
27+
if [ -f $install_dir/.maintenance ]
28+
then
29+
echo "1"
30+
else
31+
echo "0"
32+
fi
33+
}
34+
2535
get__fpm_footprint() {
2636
# Free footprint value for php-fpm
2737
# Check if current_fpm_footprint is an integer
@@ -49,6 +59,20 @@ get__free_footprint() {
4959
# SPECIFIC SETTERS FOR TOML SHORT KEYS
5060
#=================================================
5161

62+
set__maintenance_mode() {
63+
if [ "$maintenance_mode" -eq "1" ]; then
64+
# If maintenance_mode was set to 1, enable maintenance mode
65+
(cd "$install_dir" && ynh_exec_as "$app" \
66+
echo "Site under maintenance." > .maintenance)
67+
ynh_print_info "Maintenance mode disabled"
68+
elif [ "$maintenance_mode" -eq "0" ]; then
69+
# If maintenance_mode was set to 0, disable maintenance mode
70+
ynh_secure_remove --file=$install_dir/.maintenance
71+
ynh_print_info "Maintenance mode enabled"
72+
fi
73+
ynh_app_setting_set --app=$app --key=maintenance_mode --value="$maintenance_mode"
74+
}
75+
5276
set__fpm_footprint() {
5377
if [ "$fpm_footprint" != "specific" ]
5478
then

0 commit comments

Comments
 (0)