How to renew certificate on Citrix XenServer


Создаём скрипт

nano /opt/cert_renew.sh

Вставляем туда код

echo “stopping services”
/opt/openpegasus/bin/cimserver -s
/etc/init.d/cimserver-watchdog stop || true
/etc/init.d/xapissl stop

cert=”/etc/xensource/xapi-ssl.pem”
cert_backup=”${cert}.`date -u +%Y%m%dT%TZ`”

mv -f “${cert}” “${cert_backup}”

/opt/xensource/libexec/generate_ssl_cert “${cert}” `hostname -f`

echo “starting services”
/etc/init.d/cimserver-watchdog start
/etc/init.d/xapissl start

И выполняем его.