mirror of
https://github.com/YunoHost-Apps/20euros_ynh.git
synced 2024-09-03 18:05:53 +02:00
Testing (#22)
* Cleaning up (#9) * Update README_fr.md * cleaning up * Fix package_checker warning * permission rework * From source * Update app.src * fix * fix * Set SVG badge * Update README_fr.md * Small fix * Small fixes * Cleaning up * Update manifest.json * Update change_url * Update manifest.json * Update upgrade * Add user * Fix * fix * Update install * Fix * [autopatch] Update issue and PR templates (#16) * Testing (#13) - Set permissions * [autopatch] Update issue and PR templates (#15) Co-authored-by: Yunohost-Bot <> * [autopatch] Update issue and PR templates Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: Yunohost-Bot <> * Update manifest.json * Update check_process * Update restore * Cleaning up * Auto-update README * Auto-update README * Update manifest.json * Auto-update README * update to 4.3 * Update manifest.json * Auto-update README * Update manifest.json * Auto-update README * Auto-update README * Update manifest.json * Update manifest.json * Auto-update README * V2 (#20) * v2 * Auto-update README * V2 * Auto-update README * Fix * Auto-update README * Auto-update README * Create description.md * Update manifest.toml * Auto-update README * Update install --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org> * Delete description.md * Create DESCRIPTION.md * Auto-update README * Fix * Auto-update README * src * Update manifest.toml * Auto-update README --------- Co-authored-by: YunoHost Bot <yunohost-bot@users.noreply.github.com> Co-authored-by: Yunohost-Bot <> Co-authored-by: yunohost-bot <yunohost@yunohost.org>
This commit is contained in:
parent
488abb23d3
commit
869473d04d
5 changed files with 17 additions and 87 deletions
|
@ -6,6 +6,7 @@ It shall NOT be edited by hand.
|
|||
# 20 euros for YunoHost
|
||||
|
||||
[![Integration level](https://dash.yunohost.org/integration/20euros.svg)](https://dash.yunohost.org/appci/app/20euros) ![Working status](https://ci-apps.yunohost.org/ci/badges/20euros.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/20euros.maintain.svg)
|
||||
|
||||
[![Install 20 euros with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=20euros)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
@ -17,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
Variante de 2048 avec pièces et billets en euros.
|
||||
|
||||
**Shipped version:** 1.0~ynh8
|
||||
**Shipped version:** 1.0~ynh9
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ It shall NOT be edited by hand.
|
|||
# 20 euros pour YunoHost
|
||||
|
||||
[![Niveau d’intégration](https://dash.yunohost.org/integration/20euros.svg)](https://dash.yunohost.org/appci/app/20euros) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/20euros.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/20euros.maintain.svg)
|
||||
|
||||
[![Installer 20 euros avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=20euros)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
@ -17,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
|
|||
|
||||
Variante de 2048 avec pièces et billets en euros.
|
||||
|
||||
**Version incluse :** 1.0~ynh8
|
||||
**Version incluse :** 1.0~ynh9
|
||||
|
||||
## Captures d’écran
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
SOURCE_URL=https://github.com/jatekos101/20euros/archive/v0.1.zip
|
||||
SOURCE_SUM=79e743f874eef952e8e0ca5f7a48d04872d7671a9c0581ce188fc42ee11bdf72
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=true
|
|
@ -5,7 +5,7 @@ name = "20 euros"
|
|||
description.en = "2048 variant with Euro coins and notes"
|
||||
description.fr = "Variante de 2048 avec pièces et billets en euros"
|
||||
|
||||
version = "1.0~ynh8"
|
||||
version = "1.0~ynh9"
|
||||
|
||||
maintainers = ["eric_G"]
|
||||
|
||||
|
@ -14,11 +14,11 @@ license = "MIT"
|
|||
code = "https://github.com/jatekos101/20euros"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.1.2"
|
||||
yunohost = ">= 11.1.16"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
ldap = "not_relevant"
|
||||
sso = "not_relevant"
|
||||
ldap = false
|
||||
sso = true
|
||||
disk = "50M"
|
||||
ram.build = "50M"
|
||||
ram.runtime = "50M"
|
||||
|
@ -38,6 +38,14 @@ ram.runtime = "50M"
|
|||
default = "visitors"
|
||||
|
||||
[resources]
|
||||
|
||||
[resources.sources]
|
||||
|
||||
[resources.sources.main]
|
||||
url = "https://github.com/jatekos101/20euros/archive/v0.1.zip"
|
||||
sha256 = "79e743f874eef952e8e0ca5f7a48d04872d7671a9c0581ce188fc42ee11bdf72"
|
||||
autoupdate.strategy = "latest_github_tag"
|
||||
|
||||
[resources.system_user]
|
||||
|
||||
[resources.install_dir]
|
||||
|
|
|
@ -7,88 +7,13 @@
|
|||
#=================================================
|
||||
|
||||
source /usr/share/yunohost/helpers
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS
|
||||
#=================================================
|
||||
|
||||
old_domain=$YNH_APP_OLD_DOMAIN
|
||||
old_path=$YNH_APP_OLD_PATH
|
||||
|
||||
new_domain=$YNH_APP_NEW_DOMAIN
|
||||
new_path=$YNH_APP_NEW_PATH
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=2
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# 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"
|
||||
|
||||
# restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# CHECK WHICH PARTS SHOULD BE CHANGED
|
||||
#=================================================
|
||||
|
||||
change_domain=0
|
||||
if [ "$old_domain" != "$new_domain" ]
|
||||
then
|
||||
change_domain=1
|
||||
fi
|
||||
|
||||
change_path=0
|
||||
if [ "$old_path" != "$new_path" ]
|
||||
then
|
||||
change_path=1
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=3
|
||||
|
||||
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"
|
||||
# Set global variables for NGINX helper
|
||||
domain="$old_domain"
|
||||
path_url="$new_path"
|
||||
# Create a dedicated NGINX config
|
||||
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
|
||||
# Store file checksum for the new config file location
|
||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||
fi
|
||||
ynh_change_url_nginx_config
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
Loading…
Reference in a new issue