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

Merge pull request #109 from csavelief/master

Fixes YunoHost-Apps/jenkins_ynh#108
This commit is contained in:
yalh76 2023-07-26 22:47:13 +02:00 committed by GitHub
commit 91d87fa60b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -115,12 +115,17 @@ ynh_add_nginx_config
ynh_script_progression --message="Installing Jenkins..."
# Download jenkins deb file and install it.
dpkg --install --force-confnew ../conf/jenkins.deb
dpkg --install --force-confnew ../conf/jenkins.deb || true
dpkg_install_failed=$(dpkg-query -f '${status} ${package}\n' -W | awk '$4 ~ /^jenkins.*/ && $3 != "installed" {print $4}' | wc -l)
if [[ $dpkg_install_failed -ge 1 ]]; then
ynh_print_warn --message="The service jenkins cannot be started for now."
fi
#=================================================
# SETUP APPLICATION
#=================================================
ynh_script_progression --message="Setuping application..."
ynh_script_progression --message="Setuping application on port $port..."
cat >> "$final_path/jenkins.install.InstallUtil.lastExecVersion" <<EOF
$jenkins_version
@ -138,6 +143,10 @@ systemctl daemon-reload --quiet
ynh_systemd_action --service_name=$app --action="restart" --line_match="Started Jenkins Continuous Integration Server" --log_path="systemd"
if [[ $dpkg_install_failed -ge 1 ]]; then
dpkg --configure -a
fi
#=================================================
# INSTALL PLUGINS
#=================================================