123456789101112131415161718192021222324252627282930313233343536 |
- #! /usr/bin/env sh
-
- dir="$(dirname $(readlink -f "${0}"))"
-
- pip3 install -r "${dir}/requirements.txt" &&
-
- if [ ! -e /etc/sitegen ]
- then
- rm -f /etc/sitegen &&
- cp -r "${dir}/sitegen" /etc/sitegen
- fi &&
-
- cp "${dir}/sitegen.py" /usr/local/bin/sitegen &&
-
- for typedir in "${dir}"/sitegen/hooks-available/*
- do
- for hookfile in "${typedir}"/*
- do
- type=$(basename "${typedir}")
- hook=$(basename "${hookfile}")
- sitegen --hook-"${type}"-enable "${hook}"
- done
- done &&
-
- cp "${dir}/bash/sitegen.completion" /etc/bash_completion.d/sitegen &&
-
- cp "${dir}/apache/sitegen.conf" /etc/apache2/conf-available/sitegen.conf &&
- a2enconf sitegen &&
- service apache2 reload &&
-
- if [ ! -e /etc/cron.d/sitegen-cert-renew ]
- then
- rm -f /etc/cron.d/cert-renew &&
- cp "${dir}/cron/sitegen-cert-renew" /etc/cron.d/sitegen-cert-renew
- fi &&
- service cron reload
|