File: lessdisks-export

package info (click to toggle)
lessdisks 0.5.3cvs.20040906-16
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,480 kB
  • ctags: 271
  • sloc: sh: 3,058; makefile: 92
file content (38 lines) | stat: -rwxr-xr-x 1,073 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/ash

# copyright 2004 vagrant@freegeek.org, distributed under the terms of the
# GNU General Public License version 2 or any later version.

if [ -z "$export_type" ]
then
  . /etc/lessdisks/server.config
fi

if [ -z "$rw" ]
then
  rw="/var/state/lessdisks"
fi

echo "exporting config files via $export_type"
case "$export_type" in
  # FIXME disable thy's cache? was problematically caching files for too long.
  thy) /usr/sbin/thy -l /8080 -w $rw/etc -o nopidfile -d text/plain ;;
  thttpd) /usr/sbin/thttpd -p 8080 -d $rw/etc -nos ;;
  khttpd) modprobe khttpd
    cd /proc/sys/net/khttpd
    echo "80" >  clientport
    echo "8080" >  serverport
    echo "$rw/etc" >  documentroot
    echo "1" >  sloppymime
    echo "1" >  start
    ;;
  *) if [ -x /etc/init.d/$export_type ] 
    then
      /etc/init.d/$export_type force-reload
    else
      echo "config file export type \"$export_type\" invalid"
      echo "this may make configuration of this terminal difficult"
      echo "if you do not intend to run X, this is probably not a big deal"
    fi
    ;;
esac