wok-tiny view manager/receipt @ rev 155
plop/bootloader.S: typos
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Oct 12 12:05:54 2019 +0200 (2019-10-12) |
parents | 371673f39e46 |
children | 1e55ea7da8de |
line source
1 # SliTaz package receipt.
3 PACKAGE="manager"
4 VERSION="1.0"
5 CATEGORY="network"
6 SHORT_DESC="Tiny SliTaz Web Manager"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="http://tiny.slitaz.org/"
10 CONFIG_FILES="/etc/httpd.conf"
11 DEPENDS="base-tiny"
12 CONFIG_FILES="/etc/daemons.conf /etc/rcS.conf"
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 genpkg_rules()
16 {
17 cp -a $stuff/. $fs
18 }
20 post_install()
21 {
22 grep -q inetd $1/etc/rcS.conf ||
23 sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf
24 grep -q /httpd $1/etc/inetd.conf || cat >> $1/etc/inetd.conf <<EOT
25 http stream tcp nowait root httpd httpd -i -u 0:0
26 EOT
27 while read line comment ; do
28 grep -qs "^$line" $1/etc/httpd.conf && continue
29 echo "$line $comment" >> $1/etc/httpd.conf
30 done <<EOT
31 H:/var/www # define the server root.
32 I:index.sh # Show index.html when a directory is requested
33 *.sh:/bin/sh # run xxx.sh through an interpreter
34 A:127.0.0.1 # Allow local loopback connections
35 $( . $1/etc/network.conf
36 while [ -n "$IP" ]; do
37 IFS=. ; set -- $IP $NETMASK ; unset IFS
38 echo "A: $(($1 & $5)).$(($2 & $6)).$(($3 & $7)).$(($4 & $8))/$NETMASK"
39 IP="$LAN_IP" ; NETMASK="$LAN_NETMASK" ; LAN_IP=""
40 done )
41 D:* # Deny from other IP connections
42 /adm:admin:$MANAGER_PASSWORD # Require user admin, pwd setup on urls starting with /adm/
43 EOT
44 grep -qs "^E404:" $1/etc/httpd.conf || cat >> $1/etc/httpd.conf <<EOT
45 E404:/var/www/E404.html # the 404 (not found) error page
46 EOT
47 }
49 config_form()
50 {
51 [ -n "$MANAGER_PASSWORD" ] || MANAGER_PASSWORD=setup
52 cat <<EOT
53 <table>
54 <tr>
55 <td>Admin password ( for http://the-tiny-server/adm/ )</td>
56 <td><input type="text" name="MANAGER_PASSWORD" value="$MANAGER_PASSWORD" /></td>
57 </tr>
58 </table>
59 EOT
60 }