Skip to content

Instantly share code, notes, and snippets.

@dale-c-anderson
Created August 8, 2016 05:06
Show Gist options
  • Save dale-c-anderson/681cdd355974ed06569e7ae74bbbed1c to your computer and use it in GitHub Desktop.
Save dale-c-anderson/681cdd355974ed06569e7ae74bbbed1c to your computer and use it in GitHub Desktop.
Postgrey restart script is broken on Ubuntu, and has been forever. What year is it again??
#!/bin/bash -u
# Restart postfix on Ubuntu 14.04
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
service postgrey status
start-stop-daemon --stop --pidfile /var/run/postgrey.pid --name /usr/sbin/postg
service postgrey status
service postgrey start
service postgrey status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment