diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2008-01-21 09:40:26 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2008-01-21 09:40:26 +0000 |
commit | 543dbda57944f70d1fb82b00f64d4b4b78205ba9 (patch) | |
tree | 6755568f3327ca30fc36e56a2e6d7782f973eee0 | |
parent | a5e55b7da70c1f7771e5c5e767e48e2a0be7b191 (diff) | |
download | alpine-conf-543dbda57944f70d1fb82b00f64d4b4b78205ba9.zip |
added setup-acf. version 1.3
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | setup-acf | 55 |
2 files changed, 57 insertions, 1 deletions
@@ -1,4 +1,4 @@ -V=1.2 +V=1.3 P=alpine-conf PV=$(P)-$(V) APKF=$(PV).apk @@ -9,6 +9,7 @@ TMP=$(PV) LIB_FILES=libalpine.sh SBIN_FILES=albootstrap\ lbu\ + setup-acf\ setup-ads\ setup-alpine\ setup-cryptswap\ diff --git a/setup-acf b/setup-acf new file mode 100644 index 0000000..7a3d81b --- /dev/null +++ b/setup-acf @@ -0,0 +1,55 @@ +#!/bin/sh + +PROGRAM=setup-acf +VERSION=0.1 + +PREFIX= +. $PREFIX/lib/libalpine.sh + +usage() { + echo "$PROGRAM [-adh] [PACKAGE...]" + exit 0; +} + +pkgs="acf-core acf-alpine-baselayout" + +while getopts "adh" opt ; do + case $opt in + a) pkgs=`apk_fetch -l | grep ^acf-`;; + d) pkgs="$pkgs acf-devtools";; + h) usage;; + *) usage;; + esac +done +shift `expr $OPTIND - 1` + +while [ $# -gt 0 ]; do + pkgs="$pkgs acf-$1" + shift +done + +# install packages +apk_add mini_httpd $pkgs || exit 1 + +# setup mini_httpd and start it +mkdir -p /var/www/localhost/ +ln -s /usr/share/acf/www/ /var/www/localhost/htdocs + +cat <<EOF >/etc/mini_httpd.conf +nochroot +dir=/var/www/localhost/htdocs +user=nobody +logfile=/var/log/mini_httpd.log +cgipat=cgi-bin** +port=80 +EOF + +cat <<EOF >/etc/conf.d/mini_httpd +MINI_HTTPD_OPTS="-C /etc/mini_httpd.conf" +MINI_HTTPD_DOCROOT=/var/www/localhost/htdocs +EOF + +pidof mini_httpd >/dev/null && /etc/init.d/mini_httpd stop +rc_add -k mini_httpd +/etc/init.d/mini_httpd start + |