Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions init/caddy.service
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Requires=network-online.target
Type=notify
User=caddy
Group=caddy
RuntimeDirectory=caddy
LogsDirectory=caddy
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile --force
TimeoutStopSec=5s
Expand Down
8 changes: 1 addition & 7 deletions scripts/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ if [ "$1" = "configure" ]; then
if getent group www-data >/dev/null; then
usermod -aG www-data caddy
fi

# Add log directory with correct permissions
if [ ! -d /var/log/caddy ]; then
mkdir -p /var/log/caddy
chown -R caddy:caddy /var/log/caddy
fi
fi

if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
Expand Down Expand Up @@ -52,4 +46,4 @@ if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-decon
deb-systemd-invoke try-restart caddy-api.service >/dev/null || true
fi
fi
fi
fi