caddy-retired/systemd/install
David Kebler e24be310ae reworked caddy script - removed cmdline support for netbind
systemd service install now uses sed to insert the repo directory into the call service script before deploying.
renamed install script to fetch as to avoid confusion as it fetches the basic binary.
2020-11-27 15:52:32 -08:00

9 lines
370 B
Bash
Executable file

#!/bin/bash
# copies template to systemd
SDIR=$(dirname "$(readlink -f "$0")") || exit
DIR=$(dirname "$SDIR") || exit
SDDIR="/etc/systemd/system"
echo Caddy Reposity Root: $DIR
echo "Installing Template Service file at $SDIR/caddy@.service"
echo ---- Service file as written to $SDDIR ----
cat $SDIR/caddy@.service | sed 's:@d:'$DIR':'g | sudo tee $SDDIR/caddy@.service