mirror of
https://github.com/YunoHost-Apps/prosody_ynh.git
synced 2024-09-03 20:15:57 +02:00
Cleanup
This commit is contained in:
parent
f854f02987
commit
7684754c01
4 changed files with 12 additions and 35 deletions
|
@ -35,6 +35,12 @@ config_path=$(ynh_app_setting_get --app=$app --key=config_path)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Declaring files to be backed up..."
|
ynh_print_info --message="Declaring files to be backed up..."
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BACKUP THE CONFIG DIR
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_backup --src_path="$config_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE DATA DIR
|
# BACKUP THE DATA DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -55,12 +61,6 @@ ynh_backup --src_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BACKUP VARIOUS FILES
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_backup --src_path="$config_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -177,7 +177,7 @@ ynh_use_logrotate
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add $app --log="/var/log/$app/$app.log" --needs_exposed_ports $file_port $client_port $server_port $http_port $https_port $component_port $telnet_port
|
yunohost service add $app --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -29,13 +29,6 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
config_path=$(ynh_app_setting_get --app=$app --key=config_path)
|
config_path=$(ynh_app_setting_get --app=$app --key=config_path)
|
||||||
file_port=$(ynh_app_setting_get --app=$app --key=file_port)
|
|
||||||
client_port=$(ynh_app_setting_get --app=$app --key=client_port)
|
|
||||||
server_port=$(ynh_app_setting_get --app=$app --key=server_port)
|
|
||||||
http_port=$(ynh_app_setting_get --app=$app --key=http_port)
|
|
||||||
https_port=$(ynh_app_setting_get --app=$app --key=https_port)
|
|
||||||
component_port=$(ynh_app_setting_get --app=$app --key=component_port)
|
|
||||||
config_path=$(ynh_app_setting_get --app=$app --key=telnet_port)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DISABLE METRONOME
|
# DISABLE METRONOME
|
||||||
|
@ -56,9 +49,9 @@ ynh_script_progression --message="Recreating the dedicated system user..."
|
||||||
ynh_system_user_create --username=$app
|
ynh_system_user_create --username=$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE APP MAIN DIR
|
# RESTORE THE CONFIG DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the app main directory..."
|
ynh_script_progression --message="Restoring the config directory..."
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$config_path"
|
ynh_restore_file --origin_path="$config_path"
|
||||||
|
|
||||||
|
@ -102,15 +95,6 @@ ynh_script_progression --message="Reinstalling dependencies..."
|
||||||
# Define and install dependencies
|
# Define and install dependencies
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE VARIOUS FILES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring various files..."
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/cron.d/$app"
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/$app/"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEMD
|
# RESTORE SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -136,7 +120,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add $app --log="/var/log/$app/$app.log" --needs_exposed_ports $file_port $client_port $server_port $http_port $https_port $component_port $telnet_port
|
yunohost service add $app --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -16,15 +16,8 @@ ynh_script_progression --message="Loading installation settings..."
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
config_path=$(ynh_app_setting_get --app=$app --key=config_path)
|
|
||||||
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
||||||
file_port=$(ynh_app_setting_get --app=$app --key=file_port)
|
config_path=$(ynh_app_setting_get --app=$app --key=config_path)
|
||||||
client_port=$(ynh_app_setting_get --app=$app --key=client_port)
|
|
||||||
server_port=$(ynh_app_setting_get --app=$app --key=server_port)
|
|
||||||
http_port=$(ynh_app_setting_get --app=$app --key=http_port)
|
|
||||||
https_port=$(ynh_app_setting_get --app=$app --key=https_port)
|
|
||||||
component_port=$(ynh_app_setting_get --app=$app --key=component_port)
|
|
||||||
telnet_port=$(ynh_app_setting_get --app=$app --key=telnet_port)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
|
@ -165,7 +158,7 @@ ynh_use_logrotate --non-append
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add $app --log="/var/log/$app/$app.log" --needs_exposed_ports $file_port $client_port $server_port $http_port $https_port $component_port $telnet_port
|
yunohost service add $app --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
Loading…
Add table
Reference in a new issue