summaryrefslogtreecommitdiff
path: root/vsftpd-generator
blob: f1c4cdceca83c8c9dfeba0ac5919f52691eb606c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

confdir=/etc/vsftpd
unitdir=/usr/lib/systemd/system
targetdir=$1/vsftpd.target.wants

mkdir -p ${targetdir}

for f in $(ls -1 ${confdir}/*.conf | awk -F "." '{print $1}' | awk -F "/" '{print $4}')
do
  echo "Generating systemd units for $f"
  ln -s ${unitdir}/vsftpd\@.service ${targetdir}/vsftpd\@$f.service > /dev/null 2>&1
done

exit 0