summaryrefslogtreecommitdiff
path: root/vsftpd_conf_migrate.sh
blob: 582c20dd42b32407263de832f950a5b16fa89738 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
#move old config files and symlink them
#shipped with vsftpd-2.0.1-6
shopt -s nullglob
PREFIX="vsftpd"
for file in /etc/${PREFIX}.*; do
    if [ ! -L $file ]; then
        new=`echo $file | sed s/${PREFIX}\./${PREFIX}\\\\//g | sed s/\.rpmsave//g`
        mv -f ${file} ${new}
	ln -s ${new} ${file}
	echo $file moved to $new
    fi
done