File: postinst

package info (click to toggle)
roxen 1.2beta2-2
  • links: PTS
  • area: contrib
  • in suites: hamm
  • size: 16,948 kB
  • ctags: 8,589
  • sloc: ansic: 89,632; asm: 8,431; sh: 2,915; makefile: 1,787; cpp: 377
file content (26 lines) | stat: -rw-r--r-- 537 bytes parent folder | download | duplicates (2)
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
#! /bin/sh

set -e

if [ "$1" = "configure" ]; then

    if [ ! -f /etc/roxen/Global_Variables ]; then
	cd /usr/lib/roxen/bin
	./install
	H=`hostname -f`
	D=`hostname -f|cut -d. -f2-`
	cat /etc/roxen/localhost \
	    |sed -e "s/@HOSTNAME@/$HOSTNAME/g" -e "s/@DOMAIN@/$DOMAIN/g" \
	    > /etc/roxen/localhost.new
	mv -f /etc/roxen/localhost.new /etc/roxen/localhost
    else
	sh /etc/init.d/roxen start
    fi

    update-rc.d roxen defaults > /dev/null
fi

if [ ! -f /var/www/index.html ]; then
    cat<<EOT > /var/www/index.html
EOT
fi