diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-11-30 15:17:49 +0100 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2014-12-01 22:33:18 +0100 |
commit | 6b1c75cbdc8ffe825c3954bb57bd14320d5cb693 (patch) | |
tree | fb1bfe001c57eb97a4db0516a6368bc552926a44 /package/vsftpd/S70vsftpd | |
parent | 1d627b3632f4b212f6ebe66813e7135a734c54ea (diff) |
vsftpd: use <pkg>_INSTALL_INIT_SYSV and rename init script
This commit changes the vsftpd package to use the
<pkg>_INSTALL_INIT_SYSV mechanism to install its init script, and
renames the init script in the Buildroot source tree to match how it's
named on the target.
Also, the init script is now installed unconditionally, as is done in
most packages.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/vsftpd/S70vsftpd')
-rwxr-xr-x | package/vsftpd/S70vsftpd | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/package/vsftpd/S70vsftpd b/package/vsftpd/S70vsftpd new file mode 100755 index 0000000000..6048907f60 --- /dev/null +++ b/package/vsftpd/S70vsftpd @@ -0,0 +1,33 @@ +#! /bin/sh + +set -e + +DESC="vsftpd" +NAME=vsftpd +DAEMON=/usr/sbin/$NAME + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon -S -b -x $NAME + echo "OK" + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon -K -x $NAME + echo "OK" + ;; + restart|force-reload) + echo "Restarting $DESC: " + $0 stop + sleep 1 + $0 start + echo "" + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 |