12345678910111213141516171819202122232425 |
- #! /usr/bin/env sh
-
- dir="$(dirname $(readlink -f "${0}"))"
-
- if [ ! -e /etc/sitegen ]
- then
- cp -r "${dir}/sitegen" /etc/sitegen
- fi &&
-
- cp "${dir}/sitegen.sh" /usr/local/bin/sitegen &&
- cp "${dir}/sitegen.completion" /etc/bash_completion.d/sitegen &&
-
- cp "${dir}/generate-ssl-cert.sh" /usr/local/bin/generate-ssl-cert &&
- cp "${dir}/cert-check.sh" /usr/local/bin/cert-check &&
- cp "${dir}/cert-renew-all.sh" /usr/local/bin/cert-renew-all &&
-
- cp "${dir}/apache/letsencrypt.conf" /etc/apache2/conf-available/letsencrypt.conf &&
- a2enconf letsencrypt &&
- service apache2 reload &&
-
- if [ ! -e /etc/cron.d/cert-renew ]
- then
- echo '12 00 * * 1 root cert-renew-all /etc/ssl/private $((60 * 60 * 24 * 31))' > /etc/cron.d/cert-renew
- fi &&
- service cron reload
|