#!/bin/bash CRON="/etc/cron.daily/dehydrated_autorenew" CONFIGURL="https://gist.githubusercontent.com/waja/8df78afb09691e4f383d818685f48885/raw/local.sh" CONFIGNAME="$(basename ${CONFIGURL})" CONFIGPATH="/etc/dehydrated/conf.d/" HOOKNAME="hook.sh" HOOKPATH="/etc/dehydrated/" if [ "$(lsb_release -cs)" = "jessie" ]; then BPO="-t $(lsb_release -cs)-backports" fi PACKAGES="dehydrated dehydrated-apache2" apt-get install ${BPO} ${PACKAGES} if [ ! -x ${CRON} ]; then cat > ${CRON} < ${HOOKPATH}/${HOOKNAME} && chmod +x ${HOOKPATH}/${HOOKNAME}