mirror of
https://github.com/YunoHost-Apps/turtl_ynh.git
synced 2024-09-03 20:26:35 +02:00
52 lines
1.6 KiB
Bash
Executable file
52 lines
1.6 KiB
Bash
Executable file
#!/bin/bash
|
|
# Exit on command errors and treat unset variables as an error
|
|
set -eu
|
|
|
|
#=================================================
|
|
# GENERIC STARTING
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# LOAD SETTINGS
|
|
#=================================================
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
path=$(ynh_app_setting_get $app path)
|
|
port=$(ynh_app_setting_get $app port)
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
is_public=$(ynh_app_setting_get $app path)
|
|
|
|
#=================================================
|
|
# FIX OLD THINGS
|
|
#=================================================
|
|
cp ../conf/rsyslogd.conf /etc/rsyslog.d/turtl.conf
|
|
service rsyslog restart
|
|
cp ../conf/logrotate.conf /etc/logrotate.d/turtl
|
|
|
|
#=================================================
|
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
|
#=================================================
|
|
# Backup the current version of the app
|
|
ynh_backup_before_upgrade
|
|
ynh_clean_setup () {
|
|
# restore it if the upgrade fails
|
|
ynh_restore_upgradebackup
|
|
}
|
|
# Exit if an error occurs during the execution of the script
|
|
ynh_abort_if_errors
|
|
|
|
#=================================================
|
|
# CHECK THE PATH
|
|
#=================================================
|
|
# Verify and correct path syntax
|
|
path_url=$(ynh_normalize_url_path $path_url) # Vérifie et corrige la syntaxe du path.
|
|
|
|
#=================================================
|
|
# STANDARD UPGRADE STEPS
|
|
#=================================================
|