Skip to content

Instantly share code, notes, and snippets.

@cema-sp
Created March 24, 2015 08:01
Show Gist options
  • Save cema-sp/084150dab26a5da9bbaa to your computer and use it in GitHub Desktop.
Save cema-sp/084150dab26a5da9bbaa to your computer and use it in GitHub Desktop.
Restart services from list
#!/bin/bash
# Services to start
SERVICES=(
amavis
apache2
clamav-daemon
clamav-freshclam
cron
dbus
dovecot
fail2ban
gdomap
iptables
iredapd
memcached
mysql
php5-fpm
postfix
postfix-cluebringer
slapd
sogo
spamassassin
uwsgi
)
# Restart all services
for i in ${SERVICES[@]}; do
service $i restart
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment