1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jenkins_ynh.git synced 2024-09-03 19:26:18 +02:00
jenkins_ynh/scripts/change_url

48 lines
1.6 KiB
Text
Raw Normal View History

2017-12-05 19:29:53 +01:00
#!/bin/bash
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
2021-02-25 23:05:04 +01:00
#=================================================
# STOP SYSTEMD SERVICE
2017-12-05 19:29:53 +01:00
#=================================================
2021-02-25 23:05:04 +01:00
ynh_script_progression --message="Stopping a systemd service..."
2017-12-05 19:29:53 +01:00
2024-03-19 00:08:28 +01:00
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
2017-12-05 19:29:53 +01:00
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
2021-04-10 20:50:48 +02:00
ynh_script_progression --message="Updating NGINX web server configuration..."
2017-12-05 19:29:53 +01:00
2024-02-14 13:31:37 +01:00
ynh_change_url_nginx_config
2017-12-05 19:29:53 +01:00
#=================================================
2019-01-30 15:56:18 +01:00
# MODIFY JENKINS SETUP
2017-12-05 19:29:53 +01:00
#=================================================
2020-12-03 18:24:29 +01:00
ynh_script_progression --message="Updating Jenkins setup..."
2017-12-05 19:29:53 +01:00
2024-03-19 00:08:28 +01:00
ynh_replace_string --target_file="/lib/systemd/system/jenkins.service" \
--match_string="Environment=\"JENKINS_PREFIX=$old_path\"" \
--replace_string="Environment=\"JENKINS_PREFIX=$new_path\""
2022-05-26 00:32:32 +02:00
systemctl daemon-reload --quiet
2021-02-25 23:05:04 +01:00
2017-12-05 19:29:53 +01:00
#=================================================
2021-02-25 23:05:04 +01:00
# START SYSTEMD SERVICE
2017-12-05 19:29:53 +01:00
#=================================================
2024-03-19 00:08:28 +01:00
ynh_script_progression --message="Starting $app's systemd service..." --weight=1
2017-12-05 19:29:53 +01:00
2021-02-25 23:05:04 +01:00
# Start a systemd service
2024-03-19 00:08:28 +01:00
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd"
2018-07-13 17:33:05 +02:00
2019-01-30 15:56:18 +01:00
#=================================================
# END OF SCRIPT
#=================================================
2021-04-10 20:50:48 +02:00
ynh_script_progression --message="Change of URL completed for $app"