aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAndreas Linz2016-08-15 09:39:04 +0200
committerAndreas Linz2016-08-15 09:54:08 +0200
commit92e21502e9565062a1dfaf01789d48fe0bccf2d6 (patch)
tree301e51ed63da778dc3f567e2f048b970ff740608 /PKGBUILD
parentd121330708cade86b529c375a360c3ab80817884 (diff)
downloadaur-92e21502e9565062a1dfaf01789d48fe0bccf2d6.tar.gz
Add install script
The install script creates the www-data user if it's missing and also restarts the service on package upgrades or stops it when the package will be removed.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD5
1 files changed, 1 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 26fea865e10e..b345696130b1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,6 +20,7 @@ md5sums_i686=('SKIP')
md5sums_x86_64=('SKIP')
md5sums_armv6h=('SKIP')
md5sums_aarch64=('SKIP')
+install='caddy-full-bin.install'
# expand the feature array
printf -v _features '%s,' "${_features[@]}"
@@ -34,10 +35,6 @@ source_aarch64=("caddy.tar.gz::${_url_prefix}&arch=arm64")
package() {
echo "Migration guide for caddy <0.9: https://github.com/klingtnet/caddy-AUR/blob/master/README.md"
- getent passwd 'www-data' &> /dev/null || echo <<DOC
---> User www-data is required for caddy 0.9+!
---> Create user: useradd --system --shell /usr/bin/nologin www-data
-DOC
install -Dm755 "${srcdir}/caddy" "${pkgdir}/usr/local/bin/caddy"
install -Dm644 "${srcdir}/init/linux-systemd/caddy.service" "${pkgdir}/usr/lib/systemd/system/caddy.service"
install -Dm644 "${srcdir}/init/linux-systemd/README.md" "${pkgdir}/usr/share/doc/${_realname}/service.txt"