mirror of
https://github.com/YunoHost-Apps/digisteps_ynh.git
synced 2024-09-03 18:26:21 +02:00
commit
1b881af95a
9 changed files with 10 additions and 58 deletions
|
@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
Create simple online educational pathes
|
Create simple online educational pathes
|
||||||
|
|
||||||
**Shipped version:** 0.3.9~ynh1
|
**Shipped version:** 0.5.13~ynh1
|
||||||
|
|
||||||
**Demo:** https://ladigitale.dev/digisteps/#/
|
**Demo:** https://ladigitale.dev/digisteps/#/
|
||||||
## Documentation and resources
|
## Documentation and resources
|
||||||
|
|
|
@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
|
||||||
|
|
||||||
Create simple online educational pathes
|
Create simple online educational pathes
|
||||||
|
|
||||||
**Version incluse :** 0.3.9~ynh1
|
**Version incluse :** 0.5.13~ynh1
|
||||||
|
|
||||||
**Démo :** https://ladigitale.dev/digisteps/#/
|
**Démo :** https://ladigitale.dev/digisteps/#/
|
||||||
## Documentations et ressources
|
## Documentations et ressources
|
||||||
|
|
|
@ -6,7 +6,6 @@ location __PATH__/ {
|
||||||
|
|
||||||
#index index.php;
|
#index index.php;
|
||||||
|
|
||||||
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
|
|
||||||
client_max_body_size 50M;
|
client_max_body_size 50M;
|
||||||
|
|
||||||
try_files $uri $uri/ index.php;
|
try_files $uri $uri/ index.php;
|
||||||
|
|
|
@ -5,7 +5,7 @@ name = "Digisteps"
|
||||||
description.en = "Create simple online educational pathes"
|
description.en = "Create simple online educational pathes"
|
||||||
description.fr = "Créer des parcours pédagogiques simples en ligne"
|
description.fr = "Créer des parcours pédagogiques simples en ligne"
|
||||||
|
|
||||||
version = "0.3.9~ynh1"
|
version = "0.5.13~ynh1"
|
||||||
|
|
||||||
maintainers = ["Pierre-Amiel Giraud"]
|
maintainers = ["Pierre-Amiel Giraud"]
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ ldap = false
|
||||||
sso = false
|
sso = false
|
||||||
|
|
||||||
disk = "50M"
|
disk = "50M"
|
||||||
ram.build = "50M"
|
ram.build = "100M"
|
||||||
ram.runtime = "50M"
|
ram.runtime = "50M"
|
||||||
|
|
||||||
[install]
|
[install]
|
||||||
|
@ -39,28 +39,20 @@ ram.runtime = "50M"
|
||||||
default = "/digisteps"
|
default = "/digisteps"
|
||||||
|
|
||||||
[install.init_main_permission]
|
[install.init_main_permission]
|
||||||
help.en = "If public, any visitor can create educational pathes and see saved ones, providing they know their secret questions and answers."
|
|
||||||
help.fr = "Si l’application est publique, n’importe quel visiteur pourra créer un parcours pédagogique et consulter ceux sauvegardés dont ils connaissent à la fois la question secrète et la réponse."
|
|
||||||
type = "group"
|
type = "group"
|
||||||
default = "visitors"
|
default = "visitors"
|
||||||
|
|
||||||
[resources]
|
[resources]
|
||||||
[resources.sources.main]
|
[resources.sources.main]
|
||||||
url = "https://github.com/YunoHost-Apps/digisteps_ynh/releases/download/0.3.9/digisteps-v0.3.9.zip"
|
url = "https://codeberg.org/ladigitale/digisteps/releases/download/0.5.13/digisteps-v0.5.13.zip"
|
||||||
sha256 = "cfd0723c29ae55d22496ae5db278c473f34daa64913835a1a7e3c431bfe99efc"
|
sha256 = "8e78718848980991bda3e44147c8f7de70931970dc6253595f49d9471522a759"
|
||||||
autoupdate.strategy = "latest_github_tag"
|
|
||||||
|
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
|
|
||||||
[resources.install_dir]
|
[resources.install_dir]
|
||||||
|
|
||||||
[resources.data_dir]
|
|
||||||
|
|
||||||
[resources.permissions]
|
[resources.permissions]
|
||||||
main.url = "/"
|
main.url = "/"
|
||||||
|
|
||||||
[resources.apt]
|
[resources.apt]
|
||||||
packages = "mariadb-server, php8.2-sqlite3, php8.2-gd"
|
packages = "php8.2-sqlite3, php8.2-gd"
|
||||||
|
|
||||||
[resources.database]
|
|
||||||
type = "mysql"
|
|
||||||
|
|
|
@ -27,10 +27,6 @@ ynh_backup --src_path="$install_dir"
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BACKUP THE PHP-FPM CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -14,7 +14,6 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Setting up source files..." --weight=1
|
ynh_script_progression --message="Setting up source files..." --weight=1
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
|
@ -25,10 +24,8 @@ chown -R $app:www-data "$install_dir"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
|
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
|
||||||
ynh_add_fpm_config
|
ynh_add_fpm_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -14,10 +14,8 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
|
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
|
||||||
|
|
||||||
# Remove the dedicated NGINX config
|
|
||||||
ynh_remove_nginx_config
|
ynh_remove_nginx_config
|
||||||
|
|
||||||
# Remove the dedicated PHP-FPM config
|
|
||||||
ynh_remove_fpm_config
|
ynh_remove_fpm_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
|
|
@ -18,49 +18,20 @@ upgrade_type=$(ynh_check_app_version_changed)
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
ynh_setup_source --dest_dir="$install_dir" --keep="inc/digiwords.db"
|
||||||
then
|
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
|
||||||
|
|
||||||
# Test because file doesn’t exist at first install. It is created at first page opening.
|
|
||||||
if test -f "$install_dir/inc/digiwords.db"
|
|
||||||
then
|
|
||||||
# Create a temporary directory
|
|
||||||
tmpdir="$(mktemp -d)"
|
|
||||||
|
|
||||||
# Backup the inc/digiwords.db file to the temp dir
|
|
||||||
cp -ar "$install_dir/inc/digiwords.db" "$tmpdir/digiwords.db"
|
|
||||||
|
|
||||||
# Remove the app directory securely
|
|
||||||
ynh_secure_remove --file=$install_dir
|
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
|
||||||
|
|
||||||
# Copy digiwords.db back to the install_dir
|
|
||||||
cp -ar "$tmpdir/digiwords.db" "$install_dir/inc/digiwords.db"
|
|
||||||
|
|
||||||
# Remove the tmp directory securely
|
|
||||||
ynh_secure_remove --file="$tmpdir"
|
|
||||||
else
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R "$app:www-data" "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
|
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
|
||||||
ynh_add_fpm_config
|
ynh_add_fpm_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue