Skip to content

Instantly share code, notes, and snippets.

@azrdev azrdev/README.md
Created Feb 27, 2015

Embed
What would you like to do?
systemd-unit file(s) for peervpn filtering annoying log messages

/etc/systemd/system/peervpn@.service /usr/local/sbin/peervpn-logfiltered.sh

Put these in place & do systemctl daemon-reload to allow for filtering that peervpn message from your log

#!/usr/bin/sh
/usr/bin/peervpn $* | sed -nue "/warning: could not send packet!/!p"
# To create a new PeerVPN instance called <name>, create a new configuration file
# /etc/peervpn/<name>.conf. You can use the provided example configuration file
# peervpn.conf as a template.
#
# After the configuration file is created, you can control the instance with
# systemctl using systemd unit named peervpn@<name>.service.
[Unit]
Description=PeerVPN Node (%i) logfiltered
After=syslog.target network.target
ConditionPathExists=/etc/peervpn/%i.conf
[Service]
Type=simple
ExecStart=/usr/local/sbin/peervpn-logfiltered.sh /etc/peervpn/%i.conf
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.