Blame SOURCES/vsftpd-generator

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