mirror of
https://github.com/YunoHost-Apps/jenkins_ynh.git
synced 2024-09-03 19:26:18 +02:00
Fixing ynh_systemd_action
This commit is contained in:
parent
380cfdef94
commit
a1c6dbc249
3 changed files with 7 additions and 7 deletions
|
@ -67,7 +67,7 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
|||
#=================================================
|
||||
ynh_script_progression --message="Reload nginx"
|
||||
|
||||
ynh_systemd_action --action=reload --service_name=nginx
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -152,14 +152,14 @@ timeout=3600
|
|||
echo "127.0.0.1 $domain #jenkins" | tee -a /etc/hosts
|
||||
|
||||
# Wait for Jenkins to be fully started
|
||||
ynh_systemd_action --action=restart --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="$timeout"
|
||||
ynh_systemd_action --service_name=$app --action="restart" --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="$timeout"
|
||||
|
||||
# Enable Jenkins CLI Protocol/2 for jenkins-cli
|
||||
# That the only protocol that allow connection without an authenticated user...
|
||||
ynh_replace_string --match_string="<slaveAgentPort>0</slaveAgentPort>" --replace_string="&\n<enabledAgentProtocols><string>CLI2-connect</string></enabledAgentProtocols>" --target_file=/var/lib/jenkins/config.xml
|
||||
|
||||
# Wait for Jenkins to be fully started
|
||||
ynh_systemd_action --action=restart --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="$timeout"
|
||||
ynh_systemd_action --service_name=$app --action="restart" --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="$timeout"
|
||||
|
||||
ynh_script_progression --message="Installing plugins..." --weight=60
|
||||
|
||||
|
@ -180,7 +180,7 @@ done
|
|||
ynh_permission_update --permission="main" --remove="visitors"
|
||||
|
||||
ynh_replace_string --match_string="<useSecurity>true</useSecurity>" --replace_string="<useSecurity>false</useSecurity>" --target_file=/var/lib/jenkins/config.xml
|
||||
ynh_systemd_action --action=restart --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="$timeout"
|
||||
ynh_systemd_action --service_name=$app --action="restart" --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="$timeout"
|
||||
|
||||
jenkins_cli="ynh_exec_warn_less java -jar /var/lib/jenkins/jenkins-cli.jar -s http://${domain}:${port}${path_url%/}"
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=2
|
||||
|
||||
ynh_systemd_action --action=reload --service_name=nginx
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# CHECK JENKINS STARTING
|
||||
|
@ -159,7 +159,7 @@ ynh_systemd_action --action=reload --service_name=nginx
|
|||
ynh_script_progression --message="Restarting Jenkins..." --weight=25
|
||||
|
||||
# Wait for Jenkins to be fully started
|
||||
ynh_systemd_action --action=restart --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="3600"
|
||||
ynh_systemd_action --service_name=$app --action="restart" --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="3600"
|
||||
|
||||
#=================================================
|
||||
# DEACTIVE MAINTENANCE MODE
|
||||
|
@ -183,7 +183,7 @@ ynh_script_progression --message="Upgrading plugins..." --weight=40
|
|||
cp /var/lib/jenkins/config.xml /var/lib/jenkins/config.xml.bak
|
||||
|
||||
ynh_replace_string --match_string="<useSecurity>true</useSecurity>" --replace_string="<useSecurity>false</useSecurity>" --target_file=/var/lib/jenkins/config.xml
|
||||
ynh_systemd_action --action=restart --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="3600"
|
||||
ynh_systemd_action --service_name=$app --action="restart" --line_match="Jenkins is fully up and running" --log_path="/var/log/$app/$app.log" --timeout="3600"
|
||||
|
||||
jenkins_cli="ynh_exec_warn_less java -jar /var/lib/jenkins/jenkins-cli.jar -s http://${domain}:${port}${path_url%/}"
|
||||
UPDATE_LIST=$($jenkins_cli list-plugins | grep -e ')$' | awk '{ print $1 }' )
|
||||
|
|
Loading…
Reference in a new issue