1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lufi_ynh.git synced 2024-09-03 19:36:28 +02:00
lufi_ynh/scripts/change_url
Éric Gaspar 4311a7ac2d
Testing (#80)
* Small fixs

* Auto-update README

* Version 2 (#79)

* v2

* Auto-update README

* v2

* Auto-update README

* fix

* Update install

* Update systemd.service

* fix

* fix

* fix

* fix

* Update manifest.toml

* cleaning

* Update config_panel.toml

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>

* Delete check_process

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>
2023-04-21 19:11:39 +02:00

63 lines
1.9 KiB
Bash

#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping a systemd service..."
ynh_systemd_action --service_name=$app --action="stop" --log_path="$install_dir/log/production.log"
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..."
ynh_change_url_nginx_config
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
# CONFIGURE LUFI
#=================================================
ynh_script_progression --message="Configuring lufi..."
domain="$new_domain"
path="$new_path"
ldap="#"
if [ $use_ldap -eq 1 ];
then
ldap=""
fi
ynh_add_config --template="../conf/lufi.conf" --destination="$install_dir/lufi.conf"
chmod 600 $install_dir/lufi.conf
chown $app:$app $install_dir/lufi.conf
#=================================================
# GENERIC FINALISATION
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..."
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="$install_dir/log/production.log" --line_match="Creating process id file"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for $app"