Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 78 lines (57 sloc) 1.968 kb
e315955 @klacke ""
authored
1 #!/bin/sh
2
3 prefix=$1
3a3459c @klacke ""
authored
4 installprefix=$2
5 erl=$3
28e4c73 @klacke first attempt to run properly under cygwin
authored
6 werl=$4
7 etcdir=$5
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf templa...
authored
8 vardir=$6
e315955 @klacke ""
authored
9
10 . ../vsn.mk
8104bc6 @klacke ""
authored
11 y=yaws-${YAWS_VSN}
3a3459c @klacke ""
authored
12 p=${prefix}
e315955 @klacke ""
authored
13
fdfd9e3 @klacke cvs fixes + install scripts gentoo/suse/redhat
authored
14
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf templa...
authored
15 cat yaws.template | \
16 ./Subst %yawsdir% ${prefix}/lib/yaws | \
17 ./Subst %erl% "${erl}" | \
18 ./Subst %werl% "${werl}" > ${installprefix}/bin/yaws
19
20 chmod +x ${installprefix}/bin/yaws
fdfd9e3 @klacke cvs fixes + install scripts gentoo/suse/redhat
authored
21
22
23
24
3a3459c @klacke ""
authored
25 install -d ${installprefix}/lib/yaws/examples/ebin
26 install -d ${installprefix}/lib/yaws/examples/include
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf templa...
authored
27
deddbfc Build chain modifications: Install target directories is now totally con...
Mikael Karlsson authored
28 if [ -f ${etcdir}/yaws.conf ]; then
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf templa...
authored
29 target=${etcdir}/yaws.conf.template
e315955 @klacke ""
authored
30 else
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf templa...
authored
31 target=${etcdir}/yaws.conf
e315955 @klacke ""
authored
32 fi
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf templa...
authored
33 echo "--- Writing config file to ${target}"
34
e315955 @klacke ""
authored
35
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf templa...
authored
36 cat yaws.conf.template | \
37 ./Subst %yawsdir% ${prefix}/lib/yaws | \
38 ./Subst %logdir% /var/log/yaws | \
39 ./Subst %host% `hostname` | \
40 ./Subst %port% 80 | \
41 ./Subst %docroot% ${vardir}/yaws/www | \
42 ./Subst %certdir% ${etcdir} | \
43 ./Subst %sslport% 443 > ${target}
e41d79b @klacke ""
authored
44
45
9011183 @klacke ""
authored
46 if [ -f /etc/gentoo-release ]; then
29d9882 @klacke ""
authored
47 install -d ${etcdir}/init.d/
48 install -d ${etcdir}/conf.d/
9011183 @klacke ""
authored
49 cp gentoo/init.d.yaws ${etcdir}/init.d/yaws
e06b1b5 @klacke ""
authored
50 chmod +x ${etcdir}/init.d/yaws
3a3459c @klacke ""
authored
51 sed -e "s;%prefix%;$p;g" gentoo/conf.d.yaws > ${etcdir}/conf.d/yaws
9011183 @klacke ""
authored
52 elif [ -f /etc/redhat-release ]; then
53 install -d ${etcdir}/init.d
fdfd9e3 @klacke cvs fixes + install scripts gentoo/suse/redhat
authored
54 sed -e "s;%prefix%;$p;g" redhat/yaws.init.d > ${etcdir}/init.d/yaws
55 chmod +x ${etcdir}/init.d/yaws
56 elif [ -f /etc/suseservers ]; then
57 install -d ${etcdir}/init.d
58 sed -e "s;%prefix%;$p;g" suse/yaws.init.d > ${etcdir}/init.d/yaws
9011183 @klacke ""
authored
59 chmod +x ${etcdir}/init.d/yaws
6e7055a @klacke Darwin /etc scripts support supplied by Eric Baur
authored
60 elif [ "`uname -s`" = "Darwin" ]; then
61 startupdir="/Library/StartupItems/Yaws"
62 if [ ! -d ${startupdir} ]; then
63 mkdir ${startupdir};
64 fi
65 sed -e "s;%prefix%;$p;g" darwin/Yaws.StartupItem > ${startupdir}/Yaws
66 chmod +x ${startupdir}/Yaws
67 cp darwin/Yaws.plist ${startupdir}/StartupParameters.plist
9011183 @klacke ""
authored
68 else
69 echo "Don't know how to make /etc/init scrips for this system"
fdfd9e3 @klacke cvs fixes + install scripts gentoo/suse/redhat
authored
70 echo "possibly add $1/bin/yaws -D -heart to your /etc/rc.local manually"
6377222 @klacke ""
authored
71 fi
e315955 @klacke ""
authored
72
e41d79b @klacke ""
authored
73
9011183 @klacke ""
authored
74
75
1dcb026 @klacke New better install procedure, better (more interesting) yaws.conf templa...
authored
76
77
Something went wrong with that request. Please try again.