~upstart-devel/upstart/upstart-jobs

« back to all changes in this revision

Viewing changes to utopic/etc/init/vsftpd.conf

  • Committer: Dimitri John Ledkov
  • Date: 2014-05-06 18:45:46 UTC
  • Revision ID: dimitri.ledkov@canonical.com-20140506184546-5toyx56xxrue0f0v
auto update

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# vsftpd - FTP Daemon
 
2
#
 
3
 
 
4
description     "vsftpd daemon"
 
5
author          "Chuck Short <zulcss@ubuntu.com>"
 
6
 
 
7
start on runlevel [2345] or net-device-up IFACE!=lo
 
8
stop on runlevel [!2345]
 
9
respawn
 
10
 
 
11
pre-start script
 
12
        check_standalone_mode()
 
13
        {
 
14
                # Return 1 if vsftpd.conf doesn't have listen yes or listen_ipv6=yes
 
15
                CONFFILE="/etc/vsftpd.conf"
 
16
 
 
17
                if [ -e  "${CONFFILE}" ] && ! egrep -iq "^ *listen(_ipv6)? *= *yes" "${CONFFILE}"
 
18
                then
 
19
                        echo "${CONFFILE}: listen disabled - service will not start"
 
20
                        return 1
 
21
                fi 
 
22
        }
 
23
        [ -d /var/run/vsftpd ] || install -m 755 -o root -g root -d /var/run/vsftpd
 
24
        [ -d /var/run/vsftpd/empty ] || install -m 755 -o root -g root -d /var/run/vsftpd/empty
 
25
        check_standalone_mode || stop
 
26
end script
 
27
 
 
28
exec /usr/sbin/vsftpd
 
29