[Unit] Description=SSH attack prevention After=network.target ConditionPathExists=/etc/denyhosts.conf [Service] Environment=HOSTNAME=%H PIDFile=/run/denyhosts.pid Type=forking ExecStopPost=-/bin/rm -f /run/denyhosts.pid ExecStart=/usr/bin/python /usr/sbin/denyhosts --daemon --purge --config=/etc/denyhosts.conf [Install] WantedBy=multi-user.target