mirror of
https://github.com/YunoHost-Apps/cac-proxy_ynh.git
synced 2024-09-03 18:16:07 +02:00
cleaning
This commit is contained in:
parent
284922adc8
commit
49e00dd2dd
3 changed files with 4 additions and 17 deletions
|
@ -8,18 +8,14 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
ynh_script_progression "Removing system configurations related to $app..."
|
||||
|
||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||
if ynh_hide_warnings yunohost service status $app >/dev/null; then
|
||||
yunohost service remove $app
|
||||
fi
|
||||
|
||||
# Remove the dedicated NGINX config
|
||||
ynh_config_remove_nginx
|
||||
|
||||
# Remove the dedicated systemd config
|
||||
ynh_config_remove_systemd
|
||||
|
||||
# Remove the app-specific logrotate config
|
||||
ynh_config_remove_logrotate
|
||||
|
||||
_remove_restart_script_and_sudoers
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
|
@ -20,14 +19,11 @@ if [ -n "$public_key" ]; then
|
|||
_install_restart_script_and_sudoers
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression "Reinstalling NodeJS..."
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_nodejs_install
|
||||
|
||||
#=================================================
|
||||
|
@ -43,6 +39,7 @@ mkdir --parents /var/log/$app
|
|||
|
||||
ynh_restore "/etc/systemd/system/$app.service"
|
||||
systemctl enable $app.service --quiet
|
||||
|
||||
yunohost service add $app --description="A Cors proxy letting the browser manages cookies and redirects." --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -35,13 +35,9 @@ ynh_nodejs_install
|
|||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed
|
||||
if ynh_app_upstream_version_changed; then
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from amd64.src
|
||||
ynh_setup_source --dest_dir="$install_dir/package" --full_replace
|
||||
fi
|
||||
ynh_setup_source --dest_dir="$install_dir/package" --full_replace
|
||||
|
||||
if [ -n "$public_key" ]; then
|
||||
ynh_script_progression "Enabling ssh access for dev..."
|
||||
|
@ -84,14 +80,12 @@ _generate_env_file
|
|||
#=================================================
|
||||
ynh_script_progression "Upgrading system configurations related to $app..."
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_config_add_nginx
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_config_add_systemd
|
||||
|
||||
yunohost service add $app --description="A Cors proxy letting the browser manages cookies and redirects." --log="/var/log/$app/$app.log"
|
||||
|
||||
# Use logrotate to manage app-specific logfile(s)
|
||||
ynh_config_add_logrotate
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue