From 543dbda57944f70d1fb82b00f64d4b4b78205ba9 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 21 Jan 2008 09:40:26 +0000 Subject: added setup-acf. version 1.3 --- Makefile | 3 ++- setup-acf | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 setup-acf diff --git a/Makefile b/Makefile index e735074..d5a1b2f 100644 --- a/Makefile +++ b/Makefile @@ -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 </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 </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 + -- cgit v1.2.3