You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
352 B
16 lines
352 B
#!/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
|