wok-tiny view ftp-config/receipt @ rev 90

Add some licenses
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jul 05 13:51:26 2013 +0200 (2013-07-05)
parents dc8eca11e97c
children 371673f39e46
line source
1 # SliTaz package receipt.
3 PACKAGE="ftp-config"
4 VERSION="1.0"
5 CATEGORY="configuration"
6 SHORT_DESC="File transport protocol server configuration"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="http://tiny.slitaz.org/"
10 DEPENDS="base-tiny"
12 # Rules to gen a SliTaz package suitable for Tazpkg.
13 genpkg_rules()
14 {
15 mkdir -p $fs/etc
16 }
18 config_form()
19 {
20 [ "$UPLOAD" == "on" ] && UPLOAD="ckecked=ckecked " || UPLOAD=
21 cat <<EOT
22 FTP root <input type="text" name="ROOT" >
23 allow upload <input type="checkbox" name="UPLOAD" $UPLOAD>
24 EOT
25 }
27 post_install()
28 {
29 [ -n "$UPLOAD" ] && ROOT="-w $ROOT"
30 grep -q inetd $1/etc/rcS.conf ||
31 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
32 grep -q /ftpd $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
33 ftp stream tcp nowait root /usr/sbin/ftpd /usr/sbin/ftpd $ROOT
34 EOT
35 }