Blame SOURCES/vsftpd-generator

bd78b8
#!/bin/bash
bd78b8
bd78b8
confdir=/etc/vsftpd
bd78b8
unitdir=/usr/lib/systemd/system
bd78b8
targetdir=$1/vsftpd.target.wants
bd78b8
bd78b8
mkdir -p ${targetdir}
bd78b8
bd78b8
for f in $(ls -1 ${confdir}/*.conf | awk -F "." '{print $1}' | awk -F "/" '{print $4}')
bd78b8
do
bd78b8
  echo "Generating systemd units for $f"
bd78b8
  ln -s ${unitdir}/vsftpd\@.service ${targetdir}/vsftpd\@$f.service > /dev/null 2>&1
bd78b8
done
bd78b8
bd78b8
exit 0