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

Add lpd-config
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Aug 21 19:04:10 2012 +0200 (2012-08-21)
parents 998910ee725e
children a6d2ddc65590
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 WEB_SITE="http://tiny.slitaz.org/"
9 DEPENDS="base-tiny"
11 # Rules to gen a SliTaz package suitable for Tazpkg.
12 genpkg_rules()
13 {
14 mkdir -p $fs/etc
15 }
17 config_form()
18 {
19 [ "$UPLOAD" == "on" ] && UPLOAD="ckecked=ckecked " || UPLOAD=
20 cat <<EOT
21 FTP root <input type="text" name="ROOT" >
22 allow upload <input type="checkbox" name="UPLOAD" $UPLOAD>
23 EOT
24 }
26 post_install()
27 {
28 [ -n "$UPLOAD" ] && ROOT="-w $ROOT"
29 grep -q inetd $1/etc/rcS.conf ||
30 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
31 grep -q /ftpd $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
32 ftp stream tcp nowait root /usr/sbin/ftpd /usr/sbin/ftpd $ROOT
33 EOT
34 }