caddy-retired/systemd/install

10 lines
370 B
Plaintext
Raw Normal View History

2020-05-12 14:51:19 -07:00
#!/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