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

misc updates (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Mar 30 13:45:46 2016 +0200 (2016-03-30)
parents 14e714f8c808
children 639516fd97da
line source
1 # SliTaz package receipt.
3 PACKAGE="ftp-config"
4 VERSION="1.0"
5 CATEGORY="meta"
6 GROUP="network"
7 SHORT_DESC="File transport protocol server configuration"
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="BSD"
10 WEB_SITE="http://tiny.slitaz.org/"
11 DEPENDS="base-tiny"
13 # Rules to gen a SliTaz package suitable for Tazpkg.
14 genpkg_rules()
15 {
16 mkdir -p $fs/etc
17 }
19 config_form()
20 {
21 [ "$UPLOAD" == "on" ] && UPLOAD="ckecked=ckecked " || UPLOAD=
22 cat <<EOT
23 FTP root <input type="text" name="ROOT" >
24 allow upload <input type="checkbox" name="UPLOAD" $UPLOAD>
25 EOT
26 }
28 post_install()
29 {
30 [ -n "$UPLOAD" ] && ROOT="-w $ROOT"
31 grep -q inetd $1/etc/rcS.conf ||
32 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
33 sed -i '/#ftp/d' $1/etc/inetd.conf
34 grep -q ftpd $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
35 ftp stream tcp nowait root ftpd ftpd $ROOT
36 EOT
37 }