3 # This systemd generator creates dependency symlinks that make all anytun
4 # tunnels listed in /etc/anytun/autostart be started/stopped/reloaded
5 # when anytun.service is started/stopped/reloaded.
10 WANTDIR="$1/anytun.service.wants"
11 SERVICEFILE="/lib/systemd/system/anytun@.service"
13 CONFIG_DIR=/usr/local/etc/anytun
17 if [ -f $CONFIG_DIR/autostart ] ; then
18 for NAME in `sed 's/#.*//' < $CONFIG_DIR/autostart | grep -e '\w'`; do
19 ln -s "$SERVICEFILE" "$WANTDIR/anytun@$NAME.service"