#!/bin/bash source _common.sh source /usr/share/yunohost/helpers #================================================= # STOP SYSTEMD SERVICE #================================================= ynh_script_progression "Stopping $app's systemd service..." ynh_systemctl --service=$app --action="stop" --log_path="$install_dir/log/production.log" if [ -f "$install_dir/script/hypnotoad.pid" ]; then ynh_print_info "Removing the PID file..." ynh_safe_rm "$install_dir/script/hypnotoad.pid" fi #================================================= # MODIFY URL IN NGINX CONF #================================================= ynh_script_progression "Updating NGINX web server configuration..." ynh_config_change_url_nginx #================================================= # SPECIFIC MODIFICATIONS #================================================= # CONFIGURE LUFI #================================================= ynh_script_progression "Configuring lufi..." domain="$new_domain" path="$new_path" ldap="#" if [ $use_ldap -eq 1 ]; then ldap="" fi ynh_config_add --template="lufi.conf" --destination="$install_dir/lufi.conf" chmod 600 $install_dir/lufi.conf chown $app:$app $install_dir/lufi.conf #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression "Starting $app's systemd service..." # Start a systemd service ynh_systemctl --service=$app --action="start" --log_path="$install_dir/log/production.log" --wait_until="Creating process id file" #================================================= # END OF SCRIPT #================================================= ynh_script_progression "Change of URL completed for $app"