mirror of
https://github.com/YunoHost-Apps/owntracks_ynh.git
synced 2024-09-03 19:56:24 +02:00
4.3
This commit is contained in:
parent
0b4734b130
commit
499e51c9e4
5 changed files with 7 additions and 16 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
@ -43,10 +42,6 @@
|
|||
{
|
||||
"name": "user",
|
||||
"type": "user",
|
||||
"ask": {
|
||||
"en": "Choose an user for Owntracks",
|
||||
"fr": "Choisissez un utilisateur pour Owntracks"
|
||||
},
|
||||
"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."
|
||||
|
|
|
@ -40,7 +40,6 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
|
||||
ynh_backup --src_path="$final_path"
|
||||
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue