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

Fix ctorrent-dnh & tfttest
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 14 09:04:04 2021 +0000 (2021-07-14)
parents e37956962a84
children
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 AUTO_SELECTION="CONFIG_FTPD"
12 DEPENDS="base-tiny busybox-net"
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 genpkg_rules()
16 {
17 mkdir -p $fs/etc
18 }
20 config_form()
21 {
22 cat <<EOT
23 FTP root <input type="text" name="ROOT" ${ROOT:+value="$ROOT" }>
24 allow upload <input type="checkbox" name="UPLOAD" ${UPLOAD:+checked="checked" }>
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 'stream.*ftpd' $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
35 ftp stream tcp nowait root ftpd ftpd $ROOT
36 EOT
37 }