1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/owntracks_ynh.git synced 2024-09-03 19:56:24 +02:00
This commit is contained in:
ericgaspar 2021-11-27 09:12:05 +01:00
parent 0b4734b130
commit 499e51c9e4
5 changed files with 7 additions and 16 deletions

View file

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

View file

@ -20,7 +20,7 @@
"url": "https://github.com/tituspijean/owntracks_ynh" "url": "https://github.com/tituspijean/owntracks_ynh"
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.2.0" "yunohost": ">= 4.3.0"
}, },
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
@ -31,8 +31,7 @@
"arguments": { "arguments": {
"install": [{ "install": [{
"name": "domain", "name": "domain",
"type": "domain", "type": "domain"
"example": "example.com"
}, },
{ {
"name": "path", "name": "path",
@ -43,10 +42,6 @@
{ {
"name": "user", "name": "user",
"type": "user", "type": "user",
"ask": {
"en": "Choose an user for Owntracks",
"fr": "Choisissez un utilisateur pour Owntracks"
},
"help": { "help": {
"en": "Mandatory if the app is set to public. This user's traces will be displayed to visitors.", "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." "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" ynh_backup --src_path="$final_path"
#================================================= #=================================================
# BACKUP THE NGINX CONFIGURATION # 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 # 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" 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 # 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_script_progression --message="Validating restoration parameters..."
ynh_webpath_available --domain=$domain --path_url=$path_url \ test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
|| ynh_die --message="Path not available: ${domain}${path_url}"
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
#================================================= #=================================================
# STANDARD RESTORATION STEPS # STANDARD RESTORATION STEPS