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

fix ftp-config
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jul 19 23:54:55 2012 +0200 (2012-07-19)
parents d3c5f3688ec0
children 86d6fe10f092
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 cat <<EOT
20 FTP root <input type="text" name="ROOT" >
21 allow upload <input type="checkbox" name="UPLOAD" >
22 EOT
23 }
25 post_install()
26 {
27 [ -n "$UPLOAD" ] && ROOT="-w $ROOT"
28 grep -q inetd $1/etc/rcS.conf ||
29 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
30 cat >> $1/etc/inetd.conf <<EOT
31 21 stream tcp nowait root /usr/sbin/ftpd /usr/sbin/ftpd $ROOT
32 EOT
33 }