mirror of
https://github.com/YunoHost-Apps/lutim_ynh.git
synced 2024-09-03 19:36:24 +02:00
Misc upgrade
This commit is contained in:
parent
a934b73698
commit
750ea40195
12 changed files with 126 additions and 82 deletions
|
@ -18,11 +18,10 @@
|
|||
port_already_use=1 (8095)
|
||||
change_url=1
|
||||
;;; Levels
|
||||
# Level 5: https://github.com/YunoHost/package_linter/issues/36
|
||||
Level 5=1
|
||||
Level 5=auto
|
||||
;;; Options
|
||||
Email=
|
||||
Notification=down
|
||||
Notification=change
|
||||
;;; Upgrade options
|
||||
; commit=4c29aa94f9d9048411c6e165e122e03574fb9b8d
|
||||
name=08 Sep 2017 4c29aa94f9d9048411c6e165e122e03574fb9b8d
|
||||
|
|
|
@ -49,6 +49,9 @@
|
|||
"fr": "L'upload des images est-il public ?"
|
||||
},
|
||||
"default": false,
|
||||
"help": {
|
||||
"en": "If you set Lutim as public, everyone will be able to upload images and share them.<br>But even if not public, everyone can see an image from a link shared with your Lutim."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "always_encrypt",
|
||||
|
|
|
@ -9,11 +9,18 @@
|
|||
source scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS
|
||||
#=================================================
|
||||
|
||||
app=${YNH_APP_INSTANCE_NAME:-$YNH_APP_ID}
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
|
||||
|
|
|
@ -9,11 +9,18 @@
|
|||
source scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS
|
||||
#=================================================
|
||||
|
||||
app=${YNH_APP_INSTANCE_NAME:-$YNH_APP_ID}
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
|
||||
|
|
|
@ -9,11 +9,18 @@
|
|||
source scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS
|
||||
#=================================================
|
||||
|
||||
app=${YNH_APP_INSTANCE_NAME:-$YNH_APP_ID}
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
|
||||
|
|
|
@ -9,11 +9,23 @@
|
|||
source scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
# Clean installation remaining that are not handle by the remove script.
|
||||
ynh_clean_check_starting
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS
|
||||
#=================================================
|
||||
|
||||
app=${YNH_APP_INSTANCE_NAME:-$YNH_APP_ID}
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
|
|
|
@ -38,6 +38,8 @@ ynh_script_progression --message="Backing up the app before changing its url (ma
|
|||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
ynh_clean_check_starting
|
||||
|
||||
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
|
||||
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||
|
||||
|
@ -72,17 +74,6 @@ then
|
|||
change_path=1
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# MANAGE FAILURE OF THE SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
# Clean installation remaining that are not handle by the remove script.
|
||||
ynh_clean_check_starting
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
|
|
|
@ -13,7 +13,7 @@ source /usr/share/yunohost/helpers
|
|||
# RETRIEVE ARGUMENTS
|
||||
#=================================================
|
||||
|
||||
app=${YNH_APP_INSTANCE_NAME:-$YNH_APP_ID}
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
|
||||
|
@ -43,9 +43,11 @@ get_config_value() {
|
|||
# always_encrypt
|
||||
old_always_encrypt="$(get_config_value always_encrypt)"
|
||||
always_encrypt="${YNH_CONFIG_MAIN_CONFIGURATION_ALWAYS_ENCRYPT:-$old_always_encrypt}"
|
||||
|
||||
# antiflood
|
||||
old_antiflood="$(get_config_value anti_flood_delay)"
|
||||
antiflood="${YNH_CONFIG_MAIN_CONFIGURATION_ANTIFLOOD:-$old_antiflood}"
|
||||
|
||||
# delay
|
||||
old_delay="$(get_config_value default_delay)"
|
||||
if [ $old_delay -eq 0 ]; then
|
||||
|
@ -101,6 +103,11 @@ show_config() {
|
|||
#=================================================
|
||||
|
||||
apply_config() {
|
||||
|
||||
#=================================================
|
||||
# MODIFY LUTIM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
restart_lutim=0
|
||||
|
||||
# Change configuration if needed
|
||||
|
@ -148,6 +155,10 @@ apply_config() {
|
|||
ynh_systemd_action --action=restart --line_match="Manager.*started" --log_path="/var/log/$app/production.log" --timeout="120"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# MODIFY OVERWRITTING SETTINGS
|
||||
#=================================================
|
||||
|
||||
# Set overwrite_settings
|
||||
ynh_app_setting_set --app=$app --key=overwrite_settings --value="$overwrite_settings"
|
||||
# Set overwrite_nginx
|
||||
|
@ -155,6 +166,10 @@ apply_config() {
|
|||
# Set overwrite_systemd
|
||||
ynh_app_setting_set --app=$app --key=overwrite_systemd --value="$overwrite_systemd"
|
||||
|
||||
#=================================================
|
||||
# MODIFY EMAIL SETTING
|
||||
#=================================================
|
||||
|
||||
# Set admin_mail_html
|
||||
ynh_app_setting_set --app=$app --key=admin_mail_html --value="$admin_mail_html"
|
||||
}
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
# Load common variables for all scripts.
|
||||
source _variables
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE FAILURE OF THE SCRIPT
|
||||
#=================================================
|
||||
|
@ -259,4 +260,4 @@ ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="root" --type
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Installation of $app completed" --time --last
|
||||
ynh_script_progression --message="Installation of $app completed" --last
|
||||
|
|
|
@ -94,4 +94,4 @@ ynh_system_user_delete --username=$app
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Removal of $app completed" --time --last
|
||||
ynh_script_progression --message="Removal of $app completed" --last
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
# Load common variables for all scripts.
|
||||
source ../settings/scripts/_variables
|
||||
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
# Load common variables for all scripts.
|
||||
source _variables
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
|
@ -209,7 +210,7 @@ ynh_system_user_create --username=$app
|
|||
#=================================================
|
||||
# SETUP LUTIM
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reconfigure Lutim"
|
||||
ynh_script_progression --message="Reconfiguring Lutim..."
|
||||
|
||||
# Overwrite the settings config file only if it's allowed
|
||||
if [ $overwrite_settings -eq 1 ]
|
||||
|
|
Loading…
Reference in a new issue