mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Rebuilt bootstrap libvirt
This commit is contained in:
parent
e312fafc3c
commit
23b4d22a72
5 changed files with 147 additions and 69 deletions
|
|
@ -375,7 +375,7 @@ __check_end_of_life_versions
|
|||
#
|
||||
install_centos() {
|
||||
if [ $DISTRO_MAJOR_VERSION -ge 6 ]; then
|
||||
yum -y install qemu-kvm libvirt bridge-utils || return 1
|
||||
yum -y install qemu-kvm libvirt bridge-utils python-libguestfs supervisor || return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
|
@ -401,6 +401,23 @@ install_centos_post() {
|
|||
echoerror "/etc/libvirt/qemu.conf not found. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
if [ $DISTRO_MAJOR_VERSION -lt 7 ]; then
|
||||
if [ -f /etc/supervisord.conf ]; then
|
||||
curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/daemon/gstfsd > /usr/local/bin/gstfsd
|
||||
chmod +x /usr/local/bin/gstfsd
|
||||
curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/supervisor/gstfsd.conf >> /etc/supervisor.conf
|
||||
else
|
||||
echoerror "Supervisor not found. Exiting..."
|
||||
exit 1
|
||||
else:
|
||||
if [ -f /etc/supervisord.conf ]; then
|
||||
curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/daemon/gstfsd > /usr/local/bin/gstfsd
|
||||
chmod +x /usr/local/bin/gstfsd
|
||||
curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/supervisor/gstfsd.conf > /etc/supervisor.d/gstfsd.ini
|
||||
else
|
||||
echoerror "Supervisor not found. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
@ -421,6 +438,14 @@ daemons_running_centos() {
|
|||
systemctl stop libvirt-guests.service > /dev/null 2>&1
|
||||
systemctl start libvirt-guests.service
|
||||
fi
|
||||
if [ -f /etc/init.d/supervisord ]; then
|
||||
service supervisord stop > /dev/null 2>&1
|
||||
service supervisord start
|
||||
fi
|
||||
if [ -f /usr/lib/systemd/system/supervisord.service ]; then
|
||||
systemctl stop supervisord.service > /dev/null 2>&1
|
||||
systemctl start supervisord.service
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
#
|
||||
|
|
@ -433,7 +458,7 @@ daemons_running_centos() {
|
|||
# Fedora Install Functions
|
||||
#
|
||||
install_fedora() {
|
||||
yum -y install kvm libvirt bridge-utils || return 1
|
||||
yum -y install kvm libvirt bridge-utils python-libguestfs supervisor || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
@ -458,6 +483,14 @@ install_fedora_post() {
|
|||
echoerror "/etc/libvirt/qemu.conf not found. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
if [ -f /etc/supervisord.conf ]; then
|
||||
curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/daemon/gstfsd > /usr/local/bin/gstfsd
|
||||
chmod +x /usr/local/bin/gstfsd
|
||||
curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/supervisor/gstfsd.conf > /etc/supervisor.d/gstfsd.ini
|
||||
else:
|
||||
echoerror "Supervisor not found. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
@ -470,6 +503,10 @@ daemons_running_fedora() {
|
|||
systemctl stop libvirt-guests.service > /dev/null 2>&1
|
||||
systemctl start libvirt-guests.service
|
||||
fi
|
||||
if [ -f /usr/lib/systemd/system/supervisord.service ]; then
|
||||
systemctl stop supervisord.service > /dev/null 2>&1
|
||||
systemctl start supervisord.service
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
#
|
||||
|
|
@ -482,7 +519,7 @@ daemons_running_fedora() {
|
|||
# Opensuse Install Functions
|
||||
#
|
||||
install_opensuse() {
|
||||
zypper -n install -l kvm libvirt bridge-utils || return 1
|
||||
zypper -n install -l kvm libvirt bridge-utils python-libguestfs supervisor || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
@ -507,6 +544,14 @@ install_opensuse_post() {
|
|||
echoerror "/etc/libvirt/qemu.conf not found. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
if [ -f /etc/supervisord.conf ]; then
|
||||
curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/daemon/gstfsd > /usr/local/bin/gstfsd
|
||||
chmod +x /usr/local/bin/gstfsd
|
||||
curl https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/supervisor/gstfsd.conf > /etc/supervisor.d/gstfsd.ini
|
||||
else:
|
||||
echoerror "Supervisor not found. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
@ -519,6 +564,10 @@ daemons_running_opensuse() {
|
|||
systemctl stop libvirt-guests.service > /dev/null 2>&1
|
||||
systemctl start libvirt-guests.service
|
||||
fi
|
||||
if [ -f /usr/lib/systemd/system/supervisord.service ]; then
|
||||
systemctl stop supervisord.service > /dev/null 2>&1
|
||||
systemctl start supervisord.service
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
#
|
||||
|
|
@ -532,7 +581,7 @@ daemons_running_opensuse() {
|
|||
#
|
||||
install_ubuntu() {
|
||||
apt-get update || return 1
|
||||
apt-get -y install kvm libvirt-bin bridge-utils sasl2-bin || return 1
|
||||
apt-get -y install kvm libvirt-bin bridge-utils sasl2-bin python-guestfs || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
@ -561,6 +610,14 @@ install_ubuntu_post() {
|
|||
echoerror "/etc/libvirt/qemu.conf not found. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
if [ -f /etc/supervisor/supervisor.conf ]; then
|
||||
wget -O /usr/local/bin/gstfsd https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/daemon/gstfsd
|
||||
chmod +x /usr/local/bin/gstfsd
|
||||
wget -O /etc/supervisor/conf.d/gstfsd.conf https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/supervisor/gstfsd.conf
|
||||
else:
|
||||
echoerror "Supervisor not found. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
@ -570,6 +627,11 @@ daemons_running_ubuntu() {
|
|||
service libvirt-bin stop > /dev/null 2>&1
|
||||
service libvirt-bin start
|
||||
fi
|
||||
if [ -f /etc/supervisor/supervisord.conf ]; then
|
||||
# Still in SysV init!?
|
||||
service supervisor stop > /dev/null 2>&1
|
||||
service supervisor start
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
#
|
||||
|
|
@ -583,7 +645,7 @@ daemons_running_ubuntu() {
|
|||
#
|
||||
install_debian() {
|
||||
apt-get update || return 1
|
||||
apt-get -y install kvm libvirt-bin bridge-utils sasl2-bin || return 1
|
||||
apt-get -y install kvm libvirt-bin bridge-utils sasl2-bin python-guestfs supervisor || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
@ -619,6 +681,14 @@ install_debian_post() {
|
|||
echoerror "/etc/libvirt/qemu.conf not found. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
if [ -f /etc/supervisor/supervisor.conf ]; then
|
||||
wget -O /usr/local/bin/gstfsd https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/daemon/gstfsd
|
||||
chmod +x /usr/local/bin/gstfsd
|
||||
wget -O /etc/supervisor/conf.d/gstfsd.conf https://raw.githubusercontent.com/retspen/webvirtcloud/master/conf/supervisor/gstfsd.conf
|
||||
else:
|
||||
echoerror "Supervisor not found. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
@ -632,6 +702,10 @@ daemons_running_debian() {
|
|||
/etc/init.d/$LIBVIRTSVC stop > /dev/null 2>&1
|
||||
/etc/init.d/$LIBVIRTSVC start
|
||||
fi
|
||||
if [ -f /etc/supervisor/supervisord.conf ]; then
|
||||
service supervisor stop > /dev/null 2>&1
|
||||
service supervisor start
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue