diff options
author | Andreas Linz | 2016-08-15 09:39:04 +0200 |
---|---|---|
committer | Andreas Linz | 2016-08-15 09:54:08 +0200 |
commit | 92e21502e9565062a1dfaf01789d48fe0bccf2d6 (patch) | |
tree | 301e51ed63da778dc3f567e2f048b970ff740608 /PKGBUILD | |
parent | d121330708cade86b529c375a360c3ab80817884 (diff) | |
download | aur-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-- | PKGBUILD | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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" |