Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

executable file 29 lines (23 sloc) 0.786 kb
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
#!/bin/sh

# Used by scripts/Makefile and scripts/rebar-pre-script to
# install yaws

rm -rf /tmp/yaws 2>/dev/null

set -e

./Install "${PREFIX}" "${ERL}" "${WERL}" "${ETCDIR}/" \
    "${VARDIR}/" "${ERLBINDIR}/" "${DESTDIR}"

conffile="${DESTDIR}${ETCDIR}/yaws/yaws.conf"
if [ -f "$conffile" ]; then
    echo "Keeping old config file $conffile"
    cp yaws.conf "${conffile}.template"
else
    echo "Installing $conffile"
    if [ -n "$DESTDIR" ]; then
        [ -d "$DESTDIR" ] || mkdir "$DESTDIR"
    fi
    [ -d "${DESTDIR}${ETCDIR}" ] || mkdir "${DESTDIR}${ETCDIR}"
    [ -d "${DESTDIR}${ETCDIR}/yaws" ] || mkdir "${DESTDIR}${ETCDIR}/yaws"
    cp yaws.conf "$conffile"
fi
cp ../ssl/yaws-cert.pem "${DESTDIR}${ETCDIR}/yaws"
cp ../ssl/yaws-key.pem "${DESTDIR}${ETCDIR}/yaws"

exit 0
Something went wrong with that request. Please try again.