mirror of
https://github.com/YunoHost-Apps/open-web-calendar_ynh.git
synced 2024-09-03 19:56:09 +02:00
cleaning
This commit is contained in:
parent
95125041b3
commit
ff637aad7a
5 changed files with 4 additions and 14 deletions
|
@ -1,6 +1,5 @@
|
||||||
#!/bin/bash
|
#!/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 ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -16,7 +15,6 @@ ynh_backup "$install_dir"
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Backup the nginx configuration
|
|
||||||
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
# Backup the systemd service unit
|
# Backup the systemd service unit
|
||||||
|
|
|
@ -12,16 +12,13 @@ ynh_script_progression "Setting up source files..."
|
||||||
|
|
||||||
ynh_setup_source --dest_dir="$install_dir" --keep="app.json"
|
ynh_setup_source --dest_dir="$install_dir" --keep="app.json"
|
||||||
|
|
||||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir"
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Adding system configurations related to $app..."
|
ynh_script_progression "Adding system configurations related to $app..."
|
||||||
|
|
||||||
# Create a dedicated NGINX config using the conf/nginx.conf template
|
|
||||||
ynh_config_add_nginx
|
ynh_config_add_nginx
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
|
||||||
ynh_config_add_systemd
|
ynh_config_add_systemd
|
||||||
|
|
||||||
yunohost service add "$app" --description="Customizable web calendar" --log="/var/log/$app/$app.log"
|
yunohost service add "$app" --description="Customizable web calendar" --log="/var/log/$app/$app.log"
|
||||||
|
@ -42,12 +39,12 @@ popd
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD A CONFIGURATION
|
# ADD A CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
#ynh_script_progression "Adding $app's configuration..."
|
ynh_script_progression "Adding $app's configuration..."
|
||||||
|
|
||||||
#ynh_config_add --template="app.json" --destination="$install_dir/app.json"
|
ynh_config_add --template="app.json" --destination="$install_dir/app.json"
|
||||||
|
|
||||||
#chmod 400 "$install_dir/app.json"
|
chmod 400 "$install_dir/app.json"
|
||||||
#chown "$app:$app" "$install_dir/app.json"
|
chown "$app:$app" "$install_dir/app.json"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -8,7 +8,6 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Removing system configurations related to $app..."
|
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
|
if ynh_hide_warnings yunohost service status "$app" >/dev/null; then
|
||||||
ynh_script_progression "Removing $app service integration..."
|
ynh_script_progression "Removing $app service integration..."
|
||||||
yunohost service remove "$app"
|
yunohost service remove "$app"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#!/bin/bash
|
#!/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 ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -11,7 +10,6 @@ ynh_script_progression "Restoring the app main directory..."
|
||||||
|
|
||||||
ynh_restore "$install_dir"
|
ynh_restore "$install_dir"
|
||||||
|
|
||||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir"
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEM CONFIGURATIONS
|
# RESTORE SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -29,7 +27,6 @@ yunohost service add "$app" --description="Customizable web calendar" --log="/va
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Reloading NGINX web server and $app's service..."
|
ynh_script_progression "Reloading NGINX web server and $app's service..."
|
||||||
|
|
||||||
### Typically you only have either $app or php-fpm but not both at the same time...
|
|
||||||
ynh_systemctl --service="$app" --action="start" --log_path="systemd"
|
ynh_systemctl --service="$app" --action="start" --log_path="systemd"
|
||||||
|
|
||||||
ynh_systemctl --service=nginx --action=reload
|
ynh_systemctl --service=nginx --action=reload
|
||||||
|
|
|
@ -19,7 +19,6 @@ ynh_script_progression "Upgrading source files..."
|
||||||
|
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir"
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REAPPLY SYSTEM CONFIGURATIONS
|
# REAPPLY SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue