Last active
February 23, 2017 00:53
-
-
Save furlongm/e99b4fe5ce5dd2a5b11ba7045b1b14a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
systemctl daemon-reexec | |
common="dbus systemd-journald systemd-udevd systemd-machined systemd-logind \ | |
polkit rpcbind chronyd rsyslog crond sshd lvm2-lvmetad irqbalance \ | |
ipmievd haveged fail2ban postfix auditd" | |
openstack_compute="libvirtd virtlockd openstack-nova-compute openvswitch \ | |
neutron-openvswitch-agent openstack-ceilometer-polling" | |
openstack_control="nova glance cinder neutron ceilometer heat aodh magnum gnocchi" | |
for service in ${common}; do | |
service ${service} restart | |
sleep 0.5 | |
done | |
killall agetty | |
if [ "$1" == "compute" ] ; then | |
for service in ${openstack_compute}; do | |
service ${service} restart | |
sleep 0.5 | |
done | |
fi | |
if [ "$1" == "control" ] ; then | |
service httpd restart | |
for service in ${openstack_control}; do | |
echo "Restarting ${service}..." | |
openstack-service restart ${service} | |
sleep 0.5 | |
done | |
swift-init restart all | |
systemctl restart memcached | |
fi | |
needs-restarting | grep -v kvm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment