1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jirafeau_ynh.git synced 2024-09-03 19:35:53 +02:00
* Update app.src
This commit is contained in:
Éric Gaspar 2021-04-11 18:58:39 +02:00 committed by GitHub
parent 2bc56e74a1
commit 2632a20206
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 52 deletions

View file

@ -27,14 +27,14 @@ Jirafeau is a web site permitting to upload a file in a simple way and give an u
## Documentation
* Official documentation:
* YunoHost documentation: https://yunohost.org/#/app_jirafeau
* YunoHost documentation: https://yunohost.org/en/app_jirafeau
## YunoHost specific features
#### Supported architectures
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/)
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/)
## Limitations

View file

@ -27,14 +27,14 @@ Jirafeau est un site web permettant d'héberger et de partager des fichiers de m
## Documentation
* Documentation officielle :
* Documentation YunoHost : https://yunohost.org/#/app_jirafeau_fr
* Documentation YunoHost : https://yunohost.org/fr/app_jirafeau
## Caractéristiques spécifiques YunoHost
#### Architectures supportées
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/)
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/)
## Limitations

View file

@ -13,16 +13,14 @@
setup_private=1
setup_public=1
upgrade=1
upgrade=1 from_commit=48ed2dc5b80ed7f1ddd39a46917f993a8c4207d5
backup_restore=1
multi_instance=0
port_already_use=0
change_url=1
;;; Options
Email=
Notification=none
;;; Upgrade options
; commit=48ed2dc5b80ed7f1ddd39a46917f993a8c4207d5
name=Refactoring and upgrade 3.3.0
; commit=
name=
manifest_arg=domain=DOMAIN&path=PATH&admin_user=USER&upload_password=supersecretpassword&is_public=1&

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://gitlab.com/mojo42/Jirafeau/repository/4.3.0/archive.tar.gz
SOURCE_SUM=435675a2b19d70155c5c3b1ee192582668f17696a040d8051bcdf9eea24dc1da
SOURCE_URL=https://gitlab.com/mojo42/Jirafeau/-/archive/4.3.0/Jirafeau-4.3.0.tar.gz
SOURCE_SUM=77bd4b69cb822ac8cac9df6890f17a673c978b10d8dd6fce46b60c763b859f74
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -27,11 +27,11 @@
/* URL of installation, with traling slash (eg. »https://exmaple.com/jirafeau/«)
*/
$cfg['web_root'] = 'https://' . '__YNH_DOMAIN__' . '__YNH_WWW_PATH__' . '/';
$cfg['web_root'] = 'https://' . '__DOMAIN__' . '__PATH__' . '/';
/* Path to data directory, with trailing slash (eg. »/var/www/data/var_314159265358979323846264«
*/
$cfg['var_root'] = '__YNH_VAR_ROOT__' . '/';
$cfg['var_root'] = '__VAR_ROOT__' . '/';
/* Language - choice between 'auto' or any language located in the /lib/locales/ folder.
* The mode »auto« will cause the script to detect the user's browser information
@ -74,7 +74,7 @@ $cfg['link_name_length'] = 8;
* $cfg['upload_password'] = array('psw1'); // One password
* $cfg['upload_password'] = array('psw1', 'psw2'); // Two passwords
*/
$cfg['upload_password'] = array(__YNH_UPLOAD_PASSWORD__);
$cfg['upload_password'] = array(__UPLOAD_PASSWORD__);
/* List of IP allowed to upload a file.
* If the list is empty, then there is no upload restriction based on IP.
@ -96,7 +96,7 @@ $cfg['admin_password'] = '';
* that the provided user is logged in.
* If »admin_password« parameter is set, then the »admin_password« is ignored.
*/
$cfg['admin_http_auth_user'] = '__YNH_ADMIN_USER__';
$cfg['admin_http_auth_user'] = '__ADMIN_USER__';
/* Allow user to select different options for file expiration time.
* Possible values in array:

View file

@ -6,7 +6,7 @@
"en": "Upload a file in a simple way and give a unique link to it",
"fr": "Hébergez simplement un fichier et partagez-le avec un lien unique"
},
"version": "4.3.0~ynh1",
"version": "4.3.0~ynh2",
"url": "https://gitlab.com/mojo42/Jirafeau",
"license": "AGPL-3.0-only",
"maintainer": {
@ -14,7 +14,7 @@
"email": "julien.malik@paraiso.me"
},
"requirements": {
"yunohost": ">= 4.0.0"
"yunohost": ">= 4.1.7"
},
"multi_instance": false,
"services": [
@ -26,19 +26,11 @@
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain for Jirafeau",
"fr": "Choisissez un domaine pour Jirafeau"
},
"example": "domain.org"
},
{
"name": "path",
"type": "path",
"ask": {
"en": "Choose a path for Jirafeau",
"fr": "Choisissez un chemin pour Jirafeau"
},
"example": "/jirafeau",
"default": "/jirafeau"
},
@ -64,10 +56,6 @@
{
"name": "is_public",
"type": "boolean",
"ask": {
"en": "Is it a public Jirafeau site?",
"fr": "Est-ce un site public ?"
},
"default": true
}
]

View file

@ -100,10 +100,10 @@ cp "../conf/config.local.php" "$jirafeauconfigfile"
ynh_print_OFF
if [ -z "$upload_password" ]
then
ynh_replace_string --match_string="__YNH_UPLOAD_PASSWORD__" --replace_string="" --target_file="$jirafeauconfigfile"
ynh_replace_string --match_string="__UPLOAD_PASSWORD__" --replace_string="" --target_file="$jirafeauconfigfile"
ynh_app_setting_set --app=$app --key=upload_password --value=""
else
ynh_replace_special_string --match_string="__YNH_UPLOAD_PASSWORD__" --replace_string="'$upload_password'" --target_file="$jirafeauconfigfile"
ynh_replace_special_string --match_string="__UPLOAD_PASSWORD__" --replace_string="'$upload_password'" --target_file="$jirafeauconfigfile"
ynh_app_setting_set --app=$app --key=upload_password --value="$upload_password"
fi
ynh_print_ON
@ -115,15 +115,15 @@ ynh_script_progression --message="Configuring Jirafeau..." --weight=2
var_root=/home/yunohost.app/$app
ynh_replace_string --match_string="__YNH_DOMAIN__" --replace_string="$domain" --target_file="$jirafeauconfigfile"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$jirafeauconfigfile"
if [ "$path_url" = "/" ]
then
ynh_replace_string --match_string="__YNH_WWW_PATH__" --replace_string="" --target_file="$jirafeauconfigfile"
ynh_replace_string --match_string="__PATH__" --replace_string="" --target_file="$jirafeauconfigfile"
else
ynh_replace_string --match_string="__YNH_WWW_PATH__" --replace_string="$path_url" --target_file="$jirafeauconfigfile"
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$jirafeauconfigfile"
fi
ynh_replace_string --match_string="__YNH_VAR_ROOT__" --replace_string="$var_root" --target_file="$jirafeauconfigfile"
ynh_replace_string --match_string="__YNH_ADMIN_USER__" --replace_string="$admin_user" --target_file="$jirafeauconfigfile"
ynh_replace_string --match_string="__VAR_ROOT__" --replace_string="$var_root" --target_file="$jirafeauconfigfile"
ynh_replace_string --match_string="__ADMIN_USER__" --replace_string="$admin_user" --target_file="$jirafeauconfigfile"
# Calculate and store the config file checksum into the app settings
ynh_store_file_checksum --file="$jirafeauconfigfile"
@ -136,10 +136,7 @@ ynh_secure_remove --file=$final_path/install.php
#=================================================
ynh_script_progression --message="Configuring the cron file..." --weight=2
cp ../conf/cron /etc/cron.d/$app
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file=/etc/cron.d/$app
ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file=/etc/cron.d/$app
ynh_replace_string --match_string="__PHPVERSION__" --replace_string=$phpversion --target_file=/etc/cron.d/$app
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
#=================================================
# GENERIC FINALISATION

View file

@ -181,10 +181,10 @@ cp "../conf/config.local.php" "$final_path/lib/config.local.php"
ynh_print_OFF
if [ -z "$upload_password" ]
then
ynh_replace_string --match_string="__YNH_UPLOAD_PASSWORD__" --replace_string="" --target_file="$jirafeauconfigfile"
ynh_replace_string --match_string="__UPLOAD_PASSWORD__" --replace_string="" --target_file="$jirafeauconfigfile"
ynh_app_setting_set --app=$app --key=upload_password --value=""
else
ynh_replace_special_string --match_string="__YNH_UPLOAD_PASSWORD__" --replace_string="'$upload_password'" --target_file="$jirafeauconfigfile"
ynh_replace_special_string --match_string="__UPLOAD_PASSWORD__" --replace_string="'$upload_password'" --target_file="$jirafeauconfigfile"
ynh_app_setting_set --app=$app --key=upload_password --value="$upload_password"
fi
ynh_print_ON
@ -196,15 +196,15 @@ ynh_script_progression --message="Upgrading Jirafeau configuration..." --weight=
var_root=/home/yunohost.app/$app
ynh_replace_string --match_string="__YNH_DOMAIN__" --replace_string="$domain" --target_file="$jirafeauconfigfile"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$jirafeauconfigfile"
if [ "$path_url" = "/" ]
then
ynh_replace_string --match_string="__YNH_WWW_PATH__" --replace_string="" --target_file="$jirafeauconfigfile"
ynh_replace_string --match_string="__PATH__" --replace_string="" --target_file="$jirafeauconfigfile"
else
ynh_replace_string --match_string="__YNH_WWW_PATH__" --replace_string="$path_url" --target_file="$jirafeauconfigfile"
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$jirafeauconfigfile"
fi
ynh_replace_string --match_string="__YNH_VAR_ROOT__" --replace_string="$var_root" --target_file="$jirafeauconfigfile"
ynh_replace_string --match_string="__YNH_ADMIN_USER__" --replace_string="$admin_user" --target_file="$jirafeauconfigfile"
ynh_replace_string --match_string="__VAR_ROOT__" --replace_string="$var_root" --target_file="$jirafeauconfigfile"
ynh_replace_string --match_string="__ADMIN_USER__" --replace_string="$admin_user" --target_file="$jirafeauconfigfile"
# Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum --file="$jirafeauconfigfile"
@ -217,10 +217,7 @@ ynh_secure_remove --file=$final_path/install.php
#=================================================
ynh_script_progression --message="Configuring the cron file..." --weight=1
cp ../conf/cron /etc/cron.d/$app
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file=/etc/cron.d/$app
ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file=/etc/cron.d/$app
ynh_replace_string --match_string="__PHPVERSION__" --replace_string=$phpversion --target_file=/etc/cron.d/$app
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
#=================================================
# GENERIC FINALISATION