Skip to content

Instantly share code, notes, and snippets.

@furlongm
Last active February 23, 2017 00:53
Show Gist options
  • Save furlongm/e99b4fe5ce5dd2a5b11ba7045b1b14a6 to your computer and use it in GitHub Desktop.
Save furlongm/e99b4fe5ce5dd2a5b11ba7045b1b14a6 to your computer and use it in GitHub Desktop.
#!/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