2020-05-12 14:51:19 -07:00
|
|
|
#!/bin/bash
|
2020-05-18 07:17:55 -07:00
|
|
|
# copies template to systemd
|
2020-11-27 14:42:53 -08:00
|
|
|
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
|