1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/element_ynh.git synced 2024-09-03 18:36:08 +02:00

Add title for each part of code

This commit is contained in:
Josué Tille 2018-02-11 00:23:13 +01:00
parent 022d669cb9
commit ef0ee9c4fc
8 changed files with 69 additions and 5 deletions

View file

@ -57,7 +57,7 @@
"en": "Is it a public server ?", "en": "Is it a public server ?",
"fr": "Est-ce un serveur publique ?" "fr": "Est-ce un serveur publique ?"
}, },
"default": 0 "default": false
} }
] ]
} }

View file

@ -1,9 +1,16 @@
#!/bin/bash #!/bin/bash
# Retrieve arguments #=================================================
# SET ALL CONSTANTS
#=================================================
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
final_path="/var/www/$app" final_path="/var/www/$app"
#=================================================
# DEFINE ALL COMMON FONCTIONS
#=================================================
config_nginx() { config_nginx() {
if [ "$path_url" != "/" ] if [ "$path_url" != "/" ]
then then

View file

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# Source YunoHost helpers # Source YunoHost helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
@ -9,6 +13,10 @@ ynh_abort_if_errors
# Import common cmd # Import common cmd
source ../settings/scripts/_common.sh source ../settings/scripts/_common.sh
#=================================================
# STANDARD BACKUP STEPS
#=================================================
# Retrieve arguments # Retrieve arguments
domain=$(ynh_app_setting_get $app domain) domain=$(ynh_app_setting_get $app domain)

View file

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# Source YunoHost helpers # Source YunoHost helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers

View file

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# Source YunoHost helpers # Source YunoHost helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
@ -27,6 +31,10 @@ ynh_app_setting_set $app is_public $is_public
ynh_app_setting_set $app default_home_server $default_home_server ynh_app_setting_set $app default_home_server $default_home_server
ynh_app_setting_set $app final_path $final_path ynh_app_setting_set $app final_path $final_path
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# Create a system user # Create a system user
ynh_system_user_create $app ynh_system_user_create $app
@ -42,6 +50,10 @@ config_riot
# Config nginx # Config nginx
config_nginx config_nginx
#=================================================
# GENERIC FINALIZATION
#=================================================
# Set final permission # Set final permission
set_permission set_permission

View file

@ -1,14 +1,19 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# Source YunoHost helpers # Source YunoHost helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
# Stop script if errors
set -u
# Import common cmd # Import common cmd
source ./_common.sh source ./_common.sh
#=================================================
# STANDARD REMOVE
#=================================================
# Retrieve arguments # Retrieve arguments
domain=$(ynh_app_setting_get $app domain) domain=$(ynh_app_setting_get $app domain)

View file

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# Source YunoHost helpers # Source YunoHost helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
@ -16,12 +20,20 @@ path_url=$(ynh_app_setting_get $app path)
# Check domain/path availability # Check domain/path availability
ynh_webpath_available $domain $path_url || ynh_die "$domain/$path_url is not available, please use an other domain or path." ynh_webpath_available $domain $path_url || ynh_die "$domain/$path_url is not available, please use an other domain or path."
#=================================================
# STANDARD RESTORATION STEPS
#=================================================
# Create a system user # Create a system user
ynh_system_user_create $app ynh_system_user_create $app
# Restore all config and data # Restore all config and data
ynh_restore ynh_restore
#=================================================
# GENERIC FINALIZATION
#=================================================
# Set final permission # Set final permission
set_permission set_permission

View file

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# Source YunoHost helpers # Source YunoHost helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
@ -16,9 +20,17 @@ is_public=$(ynh_app_setting_get $app is_public)
final_path=$(ynh_app_setting_get $app final_path) final_path=$(ynh_app_setting_get $app final_path)
default_home_server=$(ynh_app_setting_get $app default_home_server) default_home_server=$(ynh_app_setting_get $app default_home_server)
#=================================================
# MIGRATION FROM OLD VERSION
#=================================================
# Create a system user # Create a system user
grep "riot" "/etc/passwd" || ynh_system_user_create $app grep "riot" "/etc/passwd" || ynh_system_user_create $app
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
# Get source and install in source dir # Get source and install in source dir
ynh_secure_remove $final_path/bundles ynh_secure_remove $final_path/bundles
install_source install_source
@ -32,6 +44,10 @@ config_riot
# Update nginx config # Update nginx config
config_nginx config_nginx
#=================================================
# GENERIC FINALIZATION
#=================================================
# Set final permission # Set final permission
set_permission set_permission