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

Update custom-console
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 27 10:51:46 2016 +0100 (2016-02-27)
parents bb00d1e3b0f7
children 14e714f8c808
line source
1 # SliTaz package receipt.
3 PACKAGE="ftp-config"
4 VERSION="1.0"
5 CATEGORY="network"
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 ftpd ftpd $ROOT
34 EOT
35 }