#!/bin/sh # This systemd generator creates dependency symlinks that make all TellusAgent Proxies set -eu GENDIR="$1" WANTDIR="$1/tellusagent.service.wants" SERVICEFILE="/lib/systemd/system/tellusagent@.service" CONFIG_DIR=/opt/TellusAgent/ mkdir -p "$WANTDIR" for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do NAME=${CONFIG%%.conf} ln -s "$SERVICEFILE" "$WANTDIR/tellusagent@$NAME.service" done exit 0