File: ftp-proxy.preinst

package info (click to toggle)
proxy-suite 1.9.2.4-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,060 kB
  • sloc: ansic: 6,533; sh: 2,968; makefile: 285
file content (25 lines) | stat: -rw-r--r-- 446 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

set -e

movecfgfile () {
  if [ -e "/etc/$1" ] ; then
    echo -n "Moving $1"
    mv "/etc/$1" "/etc/proxy-suite/"
    echo
  fi
}

# If we are upgrading we might need to move configfiles
if [ "$1" = "upgrade" ] ;  then
  if [ ! -d /etc/proxy-suite ] ; then
    echo "Moving configuration files to /etc/proxy-suite."
    mkdir /etc/proxy-suite
    chmod 755 /etc/proxy-suite
    movecfgfile ftp-proxy.conf
  fi
fi

#DEBHELPER#

exit 0