1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/owntracks_ynh.git synced 2024-09-03 19:56:24 +02:00

Merge pull request #22 from YunoHost-Apps/testing

Testing
This commit is contained in:
tituspijean 2021-12-12 18:01:35 +01:00 committed by GitHub
commit 95f33dfb5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 26 deletions

View file

@ -12,7 +12,7 @@
setup_private=1
setup_public=1
upgrade=1
upgrade=1 from_commit=647357b164acab3cf5a908e8a51371fa09a6a7b3
upgrade=1 from_commit=f86e97b3bf963a15af911f78a9333bdee0b0f41d
backup_restore=1
multi_instance=1
change_url=1
@ -20,6 +20,6 @@
Email=
Notification=none
;;; Upgrade options
; commit=647357b164acab3cf5a908e8a51371fa09a6a7b3
name=2021-05-06
manifest_arg=domain=DOMAIN&path=PATH&user=USER&is_public=1&
; commit=f86e97b3bf963a15af911f78a9333bdee0b0f41d
name=Update check_process
manifest_arg=domain=DOMAIN&path=PATH&user=package_checker&is_public=1&

View file

@ -4,10 +4,6 @@ location __PATH__/ {
# Path to source
alias __FINALPATH__/ ;
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
index index.php;
try_files $uri $uri/ /owntracks/index.php?$args;

View file

@ -20,7 +20,7 @@
"url": "https://github.com/tituspijean/owntracks_ynh"
},
"requirements": {
"yunohost": ">= 4.2.0"
"yunohost": ">= 4.3.0"
},
"multi_instance": true,
"services": [
@ -31,8 +31,7 @@
"arguments": {
"install": [{
"name": "domain",
"type": "domain",
"example": "example.com"
"type": "domain"
},
{
"name": "path",
@ -44,9 +43,9 @@
"name": "user",
"type": "user",
"ask": {
"en": "Choose an user for Owntracks",
"fr": "Choisissez un utilisateur pour Owntracks"
},
"en": "Choose a user",
"fr": "Choisissez un utilisateur"
},
"help": {
"en": "Mandatory if the app is set to public. This user's traces will be displayed to visitors.",
"fr": "Obligatoire si l'app est publique. Les traces de cet utilisateur seront montrées aux visiteurs."

View file

@ -40,7 +40,6 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$final_path"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================

View file

@ -113,9 +113,13 @@ ynh_mysql_connect_as $app $db_pwd $db_name < "$final_path/sql/schema.sql"
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_script_progression --message="Adding a configuration file..."
ynh_add_config --template="../conf/config.inc.php" --destination="$final_path/config.inc.php"
chmod 400 "$final_path/config.inc.php"
chown $app:$app "$final_path/config.inc.php"
#=================================================
# SETUP PERMISSIONS
#=================================================

View file

@ -36,10 +36,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
ynh_script_progression --message="Validating restoration parameters..."
ynh_webpath_available --domain=$domain --path_url=$path_url \
|| ynh_die --message="Path not available: ${domain}${path_url}"
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
#=================================================
# STANDARD RESTORATION STEPS
@ -68,13 +65,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# RESTORE USER RIGHTS
#=================================================
# Restore permissions on app files
chown -R $app:www-data $final_path
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================