Add caddy-bin
This commit is contained in:
parent
b7a3da5bb5
commit
a110b4184c
40
repo/caddy-bin/Caddyfile
Normal file
40
repo/caddy-bin/Caddyfile
Normal file
@ -0,0 +1,40 @@
|
||||
# The Caddyfile is an easy way to configure your Caddy web server.
|
||||
#
|
||||
# https://caddyserver.com/docs/caddyfile
|
||||
#
|
||||
# The configuration below serves a welcome page over HTTP on port 80.
|
||||
# To use your own domain name (with automatic HTTPS), first make
|
||||
# sure your domain's A/AAAA DNS records are properly pointed to
|
||||
# this machine's public IP, then replace the line below with your
|
||||
# domain name.
|
||||
#
|
||||
# https://caddyserver.com/docs/caddyfile/concepts#addresses
|
||||
|
||||
{
|
||||
# Restrict the admin interface to a local unix file socket whose directory
|
||||
# is restricted to caddy:caddy. By default the TCP socket allows arbitrary
|
||||
# modification for any process and user that has access to the local
|
||||
# interface. If admin over TCP is turned on one should make sure
|
||||
# implications are well understood.
|
||||
admin "unix//run/caddy/admin.socket"
|
||||
}
|
||||
|
||||
http:// {
|
||||
# Set this path to your site's directory.
|
||||
root * /usr/share/caddy
|
||||
|
||||
# Enable the static file server.
|
||||
file_server
|
||||
|
||||
# Another common task is to set up a reverse proxy:
|
||||
# reverse_proxy localhost:8080
|
||||
|
||||
# Or serve a PHP site through php-fpm:
|
||||
# php_fastcgi localhost:9000
|
||||
|
||||
# Refer to the directive documentation for more options.
|
||||
# https://caddyserver.com/docs/caddyfile/directives
|
||||
}
|
||||
|
||||
# Import additional caddy config files in /etc/caddy/conf.d/
|
||||
import /etc/caddy/conf.d/*
|
54
repo/caddy-bin/PKGBUILD
Normal file
54
repo/caddy-bin/PKGBUILD
Normal file
@ -0,0 +1,54 @@
|
||||
# Maintainer: Xiufeng Guo <i@m.ac>
|
||||
pkgname=caddy-bin
|
||||
pkgver=2.7.4
|
||||
_distcommit=b633572824e26a07926a89284ddd1f1c49fbf1d6
|
||||
pkgrel=1
|
||||
pkgdesc="Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/caddyserver/caddy"
|
||||
license=('Apache-2.0')
|
||||
provides=('caddy')
|
||||
conflicts=('caddy')
|
||||
backup=('etc/caddy/Caddyfile')
|
||||
source_x86_64=(
|
||||
"https://github.com/caddyserver/caddy/releases/download/v${pkgver}/caddy_${pkgver}_linux_amd64.tar.gz"
|
||||
caddy.service
|
||||
caddy-api.service
|
||||
caddy.tmpfiles
|
||||
caddy.sysusers
|
||||
Caddyfile
|
||||
index.html
|
||||
)
|
||||
|
||||
sha512sums_x86_64=(
|
||||
# Caddy
|
||||
'68cc53c79b88da5f1a33f5a1e1da7fbac5ad041380e91e27663b44e0cb2d8e07e08690295e86e9e65a37472b52f7d95f84f383ee0b8f3d5e1bd4b755d3990e6a'
|
||||
# caddy.service
|
||||
'54e5020a000f364677f107b4d23deb6ea09b2ab51c58251365c87832d99045a82e0fc71c74a256cab0bd6a5ea19036fb63f9ab8f64b153c2d898164585d18ebc'
|
||||
# caddy-api.service
|
||||
'a69f9356d19c282b63e5179c5ddad344ce1586da6cc1c502ae537c14ee847375a4ce2015a140fc4d99a958041b8b51f4749645ffff0bea8ba7e7f9f92fb6e12b'
|
||||
# caddy.tmpfiles
|
||||
'55ee8d3f8b14f9adddc7a1026addcea4f85b4bae4cd512fd4da2a5e8adaae4b6fd0f486d2e3847f75518f4710a897b4fca84e48ee15700b968bad762125c4742'
|
||||
# caddy.sysusers
|
||||
'c893d88fec89e37da6596030c8dce7103e7e575371e8542a24d2a0741e877358d85219f2d8ade9d6aa0f515efe1156a4badd9fef5f65f553a5b0c72330c4728f'
|
||||
# Caddyfile
|
||||
'716da3f4edeb3561243aeaf5c32b01ff7a4ac810b6deba8364fb12a1f71b6a5278c34a97b289bcfdc48784679b942bf780f1f36d416a575791168c94b0d59fe0'
|
||||
# index.html
|
||||
'67f9e38c08b99749ecac1472379a5ae1af5d971a4ead814ba65b1448e43b2fffb3a290b976ad95a35b40ca066677c55052bdb6370b3db89fdc14d3fe56819d6b'
|
||||
)
|
||||
|
||||
|
||||
package() {
|
||||
# Install the executable
|
||||
install -d "$pkgdir"/usr/bin/
|
||||
install -m 755 caddy "$pkgdir"/usr/bin/
|
||||
# Copy from https://gitlab.archlinux.org/archlinux/packaging/packages/caddy/-/blob/main/PKGBUILD?ref_type=heads
|
||||
install -Dm 644 "${srcdir}/caddy.service" "${srcdir}/caddy-api.service" -t "${pkgdir}/usr/lib/systemd/system"
|
||||
install -Dm 644 "${srcdir}/caddy.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/caddy.conf"
|
||||
install -Dm 644 "${srcdir}/caddy.sysusers" "${pkgdir}/usr/lib/sysusers.d/caddy.conf"
|
||||
|
||||
install -Dm 644 "${srcdir}/Caddyfile" -t "${pkgdir}/etc/caddy"
|
||||
install -d "${pkgdir}/etc/caddy/conf.d"
|
||||
|
||||
install -Dm 644 index.html "${pkgdir}/usr/share/caddy/index.html"
|
||||
}
|
63
repo/caddy-bin/caddy-api.service
Normal file
63
repo/caddy-bin/caddy-api.service
Normal file
@ -0,0 +1,63 @@
|
||||
# caddy-api.service
|
||||
#
|
||||
# For using Caddy with its API.
|
||||
#
|
||||
# This unit is "durable" in that it will automatically resume
|
||||
# the last active configuration if the service is restarted.
|
||||
#
|
||||
# See https://caddyserver.com/docs/install for instructions.
|
||||
|
||||
[Unit]
|
||||
Description=Caddy API Server
|
||||
Documentation=https://caddyserver.com/docs/
|
||||
After=network-online.target
|
||||
Wants=network-online.target systemd-networkd-wait-online.service
|
||||
StartLimitIntervalSec=14400
|
||||
StartLimitBurst=10
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
User=caddy
|
||||
Group=caddy
|
||||
Environment=XDG_DATA_HOME=/var/lib
|
||||
Environment=XDG_CONFIG_HOME=/var/lib
|
||||
ExecStart=/usr/bin/caddy run --environ --resume
|
||||
|
||||
# Do not allow the process to be restarted in a tight loop. If the
|
||||
# process fails to start, something critical needs to be fixed.
|
||||
Restart=on-abnormal
|
||||
|
||||
# Use graceful shutdown with a reasonable timeout
|
||||
TimeoutStopSec=5s
|
||||
|
||||
LimitNOFILE=1048576
|
||||
LimitNPROC=512
|
||||
|
||||
# Hardening options
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
DevicePolicy=closed
|
||||
LockPersonality=true
|
||||
MemoryAccounting=true
|
||||
MemoryDenyWriteExecute=true
|
||||
NoNewPrivileges=true
|
||||
PrivateDevices=true
|
||||
PrivateTmp=true
|
||||
ProcSubset=pid
|
||||
ProtectClock=true
|
||||
ProtectControlGroups=true
|
||||
ProtectHome=true
|
||||
ProtectHostname=true
|
||||
ProtectKernelLogs=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectProc=invisible
|
||||
ProtectSystem=strict
|
||||
RemoveIPC=true
|
||||
ReadWritePaths=/var/lib/caddy /var/log/caddy /run/caddy
|
||||
RestrictNamespaces=true
|
||||
RestrictRealtime=true
|
||||
RestrictSUIDSGID=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
79
repo/caddy-bin/caddy-dist/FETCH_HEAD
Normal file
79
repo/caddy-bin/caddy-dist/FETCH_HEAD
Normal file
@ -0,0 +1,79 @@
|
||||
b633572824e26a07926a89284ddd1f1c49fbf1d6 not-for-merge branch 'master' of https://github.com/caddyserver/dist
|
||||
458a1906d54d5a308346cba824684aff3845556d not-for-merge branch 'new-ci' of https://github.com/caddyserver/dist
|
||||
3adafa4a0ce8adaa9c0743fdd4231e2b854e9218 not-for-merge 'refs/pull/1/head' of https://github.com/caddyserver/dist
|
||||
7c5cdb84dbb8ad8b595e5071f7cbb23ae0bf71ea not-for-merge 'refs/pull/10/head' of https://github.com/caddyserver/dist
|
||||
41de4719ff50545a5f66a221cf7c6fdde7eefe00 not-for-merge 'refs/pull/11/head' of https://github.com/caddyserver/dist
|
||||
2712be46fbccddc45ffbc6f4e02d6c8cf647a2c7 not-for-merge 'refs/pull/12/head' of https://github.com/caddyserver/dist
|
||||
d9d527325d20fdd9b51bbf679cf681e137921fbe not-for-merge 'refs/pull/13/head' of https://github.com/caddyserver/dist
|
||||
20517833265864397c6f825bf6002b10a8e488cd not-for-merge 'refs/pull/14/head' of https://github.com/caddyserver/dist
|
||||
38b11f83c605f5c3cedf50c6ba77a41daf4b618c not-for-merge 'refs/pull/15/head' of https://github.com/caddyserver/dist
|
||||
f1739ed790e51a6760c40e732ec3ffd56893d8ee not-for-merge 'refs/pull/16/head' of https://github.com/caddyserver/dist
|
||||
6402b59b8bac1700505ae8717f590c2f37b3dc9d not-for-merge 'refs/pull/17/head' of https://github.com/caddyserver/dist
|
||||
d3871ffe2a6c18111ab55d322ed68b70210b11fb not-for-merge 'refs/pull/18/head' of https://github.com/caddyserver/dist
|
||||
77eacf514f713cd27ea44edec79942c28f4e2838 not-for-merge 'refs/pull/19/head' of https://github.com/caddyserver/dist
|
||||
95dd3fa74dbea7379d005deba1f5f3ca45f1c1ae not-for-merge 'refs/pull/2/head' of https://github.com/caddyserver/dist
|
||||
cd68ca774fa7741c74033bd7ab55a9c80c8358fd not-for-merge 'refs/pull/20/head' of https://github.com/caddyserver/dist
|
||||
ba0a308ba6a4bff6a31319afbd195652c78b4b95 not-for-merge 'refs/pull/23/head' of https://github.com/caddyserver/dist
|
||||
4b006409337473beaed01ebc675873362597415d not-for-merge 'refs/pull/24/head' of https://github.com/caddyserver/dist
|
||||
8dcd4b51645f0e67f2cf43fb4361d1904aafdd8f not-for-merge 'refs/pull/25/head' of https://github.com/caddyserver/dist
|
||||
10391eb4e37a81346173fe7642c927db2a512069 not-for-merge 'refs/pull/26/head' of https://github.com/caddyserver/dist
|
||||
623ef0ee626164db51ccf9b4d3eea4dd03e8de43 not-for-merge 'refs/pull/27/head' of https://github.com/caddyserver/dist
|
||||
7088af11d1facb812c0f473e7baf49c1401c716b not-for-merge 'refs/pull/3/head' of https://github.com/caddyserver/dist
|
||||
af037f92d77a340d03f1ee8e13143d7ebe7f6336 not-for-merge 'refs/pull/30/head' of https://github.com/caddyserver/dist
|
||||
eac493096b4f9c092c3502cd1c2bd7dff38278f7 not-for-merge 'refs/pull/33/head' of https://github.com/caddyserver/dist
|
||||
3f7c88be24817ad97a5786aa3d34aad779dcdb50 not-for-merge 'refs/pull/34/head' of https://github.com/caddyserver/dist
|
||||
54154396313f188a9f04df6d293c120ab275c750 not-for-merge 'refs/pull/35/head' of https://github.com/caddyserver/dist
|
||||
f4b6ee56cd3fa5c54666eab730de9dd1cba92b04 not-for-merge 'refs/pull/36/head' of https://github.com/caddyserver/dist
|
||||
58df1df8ea6700e7f73aec9c35aa83980eeda60b not-for-merge 'refs/pull/4/head' of https://github.com/caddyserver/dist
|
||||
9e66a4931674a0b5441e0fb0608b51ada0f5d33c not-for-merge 'refs/pull/41/head' of https://github.com/caddyserver/dist
|
||||
612ea2404c7d3c7b1e8fda8c43ce6f20a08dc630 not-for-merge 'refs/pull/46/head' of https://github.com/caddyserver/dist
|
||||
5bf41955741d7bee6c24f9bc451feb1a6ac9481b not-for-merge 'refs/pull/5/head' of https://github.com/caddyserver/dist
|
||||
767247ee8d2b6d5c149f8daab8d518069ac2a82a not-for-merge 'refs/pull/52/head' of https://github.com/caddyserver/dist
|
||||
45e85e7f59590dedd58caaad228cdcc497c1ac56 not-for-merge 'refs/pull/55/head' of https://github.com/caddyserver/dist
|
||||
b9cd9a415661430ac5d3f462e054ebdb7371173a not-for-merge 'refs/pull/57/head' of https://github.com/caddyserver/dist
|
||||
f4604754734104e7ed3584051767b94fe416a6b5 not-for-merge 'refs/pull/58/head' of https://github.com/caddyserver/dist
|
||||
c4c9a6acceeedb2be7f969cec7bec224c940fdd2 not-for-merge 'refs/pull/59/head' of https://github.com/caddyserver/dist
|
||||
3a1d47e62096111aabf36ee7d084371efc33a4da not-for-merge 'refs/pull/6/head' of https://github.com/caddyserver/dist
|
||||
ad5250c362188d04919c12c6c298f95e45c3ae3f not-for-merge 'refs/pull/60/head' of https://github.com/caddyserver/dist
|
||||
b67abdcf430f769dad0cd34145eb074b1b391806 not-for-merge 'refs/pull/61/head' of https://github.com/caddyserver/dist
|
||||
44772297a992c0416a17befe088be83d6b66435a not-for-merge 'refs/pull/64/head' of https://github.com/caddyserver/dist
|
||||
8a6f0eb567d786b80c1ed6c53275d8a9470689b1 not-for-merge 'refs/pull/68/head' of https://github.com/caddyserver/dist
|
||||
0979c0be011aa9108b2f226fa4f9a1163cd5fba8 not-for-merge 'refs/pull/7/head' of https://github.com/caddyserver/dist
|
||||
4123f4446d563ce791ed153a8d58067bb4c05767 not-for-merge 'refs/pull/70/head' of https://github.com/caddyserver/dist
|
||||
0b603d1657e04ee76f573155d5b2930406a26c71 not-for-merge 'refs/pull/73/head' of https://github.com/caddyserver/dist
|
||||
96354eca0f7e021c1e5606c90cfed2a42809577f not-for-merge 'refs/pull/75/head' of https://github.com/caddyserver/dist
|
||||
b3b5669e526b925051635644a7f7aeaa248fe1cf not-for-merge 'refs/pull/77/head' of https://github.com/caddyserver/dist
|
||||
2c02f19344f2dc554aedfece841cd6e073f3a89c not-for-merge 'refs/pull/79/head' of https://github.com/caddyserver/dist
|
||||
445228be4374b86f1a3505c446f8338f7b18232e not-for-merge 'refs/pull/8/head' of https://github.com/caddyserver/dist
|
||||
0ef0d3866e69639bc746d39a1c184892c5d9d1df not-for-merge 'refs/pull/84/head' of https://github.com/caddyserver/dist
|
||||
caa4d8d8a5df21a9921e60987f21b5850c06ec29 not-for-merge 'refs/pull/85/head' of https://github.com/caddyserver/dist
|
||||
806b643003c7e7505bb761dc13e96ba69514aa0a not-for-merge 'refs/pull/86/head' of https://github.com/caddyserver/dist
|
||||
4ea58a7427111e125f37fc7bbf4f721888e21e5b not-for-merge 'refs/pull/87/head' of https://github.com/caddyserver/dist
|
||||
29b3c77b009b9055e02c4ad5b9409102cbbb009d not-for-merge 'refs/pull/88/head' of https://github.com/caddyserver/dist
|
||||
1ba6b9ba2334d4578fad624248b1735367d5ab92 not-for-merge 'refs/pull/88/merge' of https://github.com/caddyserver/dist
|
||||
7bcc0981c54b2d3abb8f0740091d39f37300e0c9 not-for-merge 'refs/pull/89/head' of https://github.com/caddyserver/dist
|
||||
928e2815ef638e6374a58b2a5ced18527c9ba6e2 not-for-merge 'refs/pull/92/head' of https://github.com/caddyserver/dist
|
||||
99e75fe1384ad5258f4503260170fcb6f4299555 not-for-merge 'refs/pull/93/head' of https://github.com/caddyserver/dist
|
||||
6358d637095260589a9d0641e5bf806aac82e3cd not-for-merge 'refs/pull/98/head' of https://github.com/caddyserver/dist
|
||||
8bab50f31bb352a9d2b286633f99917192f5fc3f not-for-merge tag 'v2.4.4' of https://github.com/caddyserver/dist
|
||||
c4d5389b5248bd20da95488e72c6b1197677da1e not-for-merge tag 'v2.4.5' of https://github.com/caddyserver/dist
|
||||
0f9eaec0213a054fe2cf8f4c25e3adf6dcc54d3c not-for-merge tag 'v2.4.6' of https://github.com/caddyserver/dist
|
||||
a941b92b6b3f16498fc3835ae8fe2d0ad34705ef not-for-merge tag 'v2.5.0' of https://github.com/caddyserver/dist
|
||||
6d797f8a3061b80977bec1dc715dec4d74138cdb not-for-merge tag 'v2.5.0-beta.1' of https://github.com/caddyserver/dist
|
||||
f010b0adeaf5ae1c7ff272c483eaed22b86aee0f not-for-merge tag 'v2.5.0-rc.1' of https://github.com/caddyserver/dist
|
||||
81a86ff9630aa9d788a060159a2294c94c44366a not-for-merge tag 'v2.5.1' of https://github.com/caddyserver/dist
|
||||
667eea69c57d0cee9476aac0b3e4e63a9d7f0dc7 not-for-merge tag 'v2.5.2' of https://github.com/caddyserver/dist
|
||||
43a1e38b457c7255f1f8e72a4f96b3bc493a2474 not-for-merge tag 'v2.6.0' of https://github.com/caddyserver/dist
|
||||
ac4b54bf84ca2aaf6bac3d46ddd05554d38f70ea not-for-merge tag 'v2.6.0-beta.3' of https://github.com/caddyserver/dist
|
||||
1aa7990c0945c36ee9f9b518c9e5a2a830b2d511 not-for-merge tag 'v2.6.0-beta.5' of https://github.com/caddyserver/dist
|
||||
d9818e7a607fb50922c5f07801bc5195ea951fdb not-for-merge tag 'v2.6.1' of https://github.com/caddyserver/dist
|
||||
024373f1d683de0a6997eeb0f9b5b051b09f4a44 not-for-merge tag 'v2.6.2' of https://github.com/caddyserver/dist
|
||||
0e53aedc178647b14ef0e403b0a335c75a66f5eb not-for-merge tag 'v2.6.3' of https://github.com/caddyserver/dist
|
||||
b0756f15b2035d3e59a9f6f64986c5c9b964e8cb not-for-merge tag 'v2.6.4' of https://github.com/caddyserver/dist
|
||||
8d1136daecf0cfe7f4eacbe3dba0b1b3af4acbe6 not-for-merge tag 'v2.7.0' of https://github.com/caddyserver/dist
|
||||
22c418ed18e1ef6e8df6439a22f2ddcd8d62714e not-for-merge tag 'v2.7.0-beta.1' of https://github.com/caddyserver/dist
|
||||
78de421c604fd6abee4e312ca86ff3e7eb45c537 not-for-merge tag 'v2.7.0-beta.2' of https://github.com/caddyserver/dist
|
||||
a3401257939bb6c5d7deda719423a80592b432af not-for-merge tag 'v2.7.1' of https://github.com/caddyserver/dist
|
||||
3769ba2a1325e1583dc022e115552831e1edf436 not-for-merge tag 'v2.7.2' of https://github.com/caddyserver/dist
|
||||
50ceddcce5a4268e2ada64dff342a94642c043dc not-for-merge tag 'v2.7.3' of https://github.com/caddyserver/dist
|
||||
dfd137a475ae1276ba16bade0f95258d9daf0e50 not-for-merge tag 'v2.7.4' of https://github.com/caddyserver/dist
|
1
repo/caddy-bin/caddy-dist/HEAD
Normal file
1
repo/caddy-bin/caddy-dist/HEAD
Normal file
@ -0,0 +1 @@
|
||||
ref: refs/heads/master
|
8
repo/caddy-bin/caddy-dist/config
Normal file
8
repo/caddy-bin/caddy-dist/config
Normal file
@ -0,0 +1,8 @@
|
||||
[core]
|
||||
repositoryformatversion = 0
|
||||
filemode = true
|
||||
bare = true
|
||||
[remote "origin"]
|
||||
url = https://github.com/caddyserver/dist
|
||||
fetch = +refs/*:refs/*
|
||||
mirror = true
|
1
repo/caddy-bin/caddy-dist/description
Normal file
1
repo/caddy-bin/caddy-dist/description
Normal file
@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
15
repo/caddy-bin/caddy-dist/hooks/applypatch-msg.sample
Executable file
15
repo/caddy-bin/caddy-dist/hooks/applypatch-msg.sample
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to check the commit log message taken by
|
||||
# applypatch from an e-mail message.
|
||||
#
|
||||
# The hook should exit with non-zero status after issuing an
|
||||
# appropriate message if it wants to stop the commit. The hook is
|
||||
# allowed to edit the commit message file.
|
||||
#
|
||||
# To enable this hook, rename this file to "applypatch-msg".
|
||||
|
||||
. git-sh-setup
|
||||
commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
|
||||
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
|
||||
:
|
24
repo/caddy-bin/caddy-dist/hooks/commit-msg.sample
Executable file
24
repo/caddy-bin/caddy-dist/hooks/commit-msg.sample
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to check the commit log message.
|
||||
# Called by "git commit" with one argument, the name of the file
|
||||
# that has the commit message. The hook should exit with non-zero
|
||||
# status after issuing an appropriate message if it wants to stop the
|
||||
# commit. The hook is allowed to edit the commit message file.
|
||||
#
|
||||
# To enable this hook, rename this file to "commit-msg".
|
||||
|
||||
# Uncomment the below to add a Signed-off-by line to the message.
|
||||
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
|
||||
# hook is more suited to it.
|
||||
#
|
||||
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
|
||||
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
|
||||
|
||||
# This example catches duplicate Signed-off-by lines.
|
||||
|
||||
test "" = "$(grep '^Signed-off-by: ' "$1" |
|
||||
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
|
||||
echo >&2 Duplicate Signed-off-by lines.
|
||||
exit 1
|
||||
}
|
174
repo/caddy-bin/caddy-dist/hooks/fsmonitor-watchman.sample
Executable file
174
repo/caddy-bin/caddy-dist/hooks/fsmonitor-watchman.sample
Executable file
@ -0,0 +1,174 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use IPC::Open2;
|
||||
|
||||
# An example hook script to integrate Watchman
|
||||
# (https://facebook.github.io/watchman/) with git to speed up detecting
|
||||
# new and modified files.
|
||||
#
|
||||
# The hook is passed a version (currently 2) and last update token
|
||||
# formatted as a string and outputs to stdout a new update token and
|
||||
# all files that have been modified since the update token. Paths must
|
||||
# be relative to the root of the working tree and separated by a single NUL.
|
||||
#
|
||||
# To enable this hook, rename this file to "query-watchman" and set
|
||||
# 'git config core.fsmonitor .git/hooks/query-watchman'
|
||||
#
|
||||
my ($version, $last_update_token) = @ARGV;
|
||||
|
||||
# Uncomment for debugging
|
||||
# print STDERR "$0 $version $last_update_token\n";
|
||||
|
||||
# Check the hook interface version
|
||||
if ($version ne 2) {
|
||||
die "Unsupported query-fsmonitor hook version '$version'.\n" .
|
||||
"Falling back to scanning...\n";
|
||||
}
|
||||
|
||||
my $git_work_tree = get_working_dir();
|
||||
|
||||
my $retry = 1;
|
||||
|
||||
my $json_pkg;
|
||||
eval {
|
||||
require JSON::XS;
|
||||
$json_pkg = "JSON::XS";
|
||||
1;
|
||||
} or do {
|
||||
require JSON::PP;
|
||||
$json_pkg = "JSON::PP";
|
||||
};
|
||||
|
||||
launch_watchman();
|
||||
|
||||
sub launch_watchman {
|
||||
my $o = watchman_query();
|
||||
if (is_work_tree_watched($o)) {
|
||||
output_result($o->{clock}, @{$o->{files}});
|
||||
}
|
||||
}
|
||||
|
||||
sub output_result {
|
||||
my ($clockid, @files) = @_;
|
||||
|
||||
# Uncomment for debugging watchman output
|
||||
# open (my $fh, ">", ".git/watchman-output.out");
|
||||
# binmode $fh, ":utf8";
|
||||
# print $fh "$clockid\n@files\n";
|
||||
# close $fh;
|
||||
|
||||
binmode STDOUT, ":utf8";
|
||||
print $clockid;
|
||||
print "\0";
|
||||
local $, = "\0";
|
||||
print @files;
|
||||
}
|
||||
|
||||
sub watchman_clock {
|
||||
my $response = qx/watchman clock "$git_work_tree"/;
|
||||
die "Failed to get clock id on '$git_work_tree'.\n" .
|
||||
"Falling back to scanning...\n" if $? != 0;
|
||||
|
||||
return $json_pkg->new->utf8->decode($response);
|
||||
}
|
||||
|
||||
sub watchman_query {
|
||||
my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
|
||||
or die "open2() failed: $!\n" .
|
||||
"Falling back to scanning...\n";
|
||||
|
||||
# In the query expression below we're asking for names of files that
|
||||
# changed since $last_update_token but not from the .git folder.
|
||||
#
|
||||
# To accomplish this, we're using the "since" generator to use the
|
||||
# recency index to select candidate nodes and "fields" to limit the
|
||||
# output to file names only. Then we're using the "expression" term to
|
||||
# further constrain the results.
|
||||
my $last_update_line = "";
|
||||
if (substr($last_update_token, 0, 1) eq "c") {
|
||||
$last_update_token = "\"$last_update_token\"";
|
||||
$last_update_line = qq[\n"since": $last_update_token,];
|
||||
}
|
||||
my $query = <<" END";
|
||||
["query", "$git_work_tree", {$last_update_line
|
||||
"fields": ["name"],
|
||||
"expression": ["not", ["dirname", ".git"]]
|
||||
}]
|
||||
END
|
||||
|
||||
# Uncomment for debugging the watchman query
|
||||
# open (my $fh, ">", ".git/watchman-query.json");
|
||||
# print $fh $query;
|
||||
# close $fh;
|
||||
|
||||
print CHLD_IN $query;
|
||||
close CHLD_IN;
|
||||
my $response = do {local $/; <CHLD_OUT>};
|
||||
|
||||
# Uncomment for debugging the watch response
|
||||
# open ($fh, ">", ".git/watchman-response.json");
|
||||
# print $fh $response;
|
||||
# close $fh;
|
||||
|
||||
die "Watchman: command returned no output.\n" .
|
||||
"Falling back to scanning...\n" if $response eq "";
|
||||
die "Watchman: command returned invalid output: $response\n" .
|
||||
"Falling back to scanning...\n" unless $response =~ /^\{/;
|
||||
|
||||
return $json_pkg->new->utf8->decode($response);
|
||||
}
|
||||
|
||||
sub is_work_tree_watched {
|
||||
my ($output) = @_;
|
||||
my $error = $output->{error};
|
||||
if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {
|
||||
$retry--;
|
||||
my $response = qx/watchman watch "$git_work_tree"/;
|
||||
die "Failed to make watchman watch '$git_work_tree'.\n" .
|
||||
"Falling back to scanning...\n" if $? != 0;
|
||||
$output = $json_pkg->new->utf8->decode($response);
|
||||
$error = $output->{error};
|
||||
die "Watchman: $error.\n" .
|
||||
"Falling back to scanning...\n" if $error;
|
||||
|
||||
# Uncomment for debugging watchman output
|
||||
# open (my $fh, ">", ".git/watchman-output.out");
|
||||
# close $fh;
|
||||
|
||||
# Watchman will always return all files on the first query so
|
||||
# return the fast "everything is dirty" flag to git and do the
|
||||
# Watchman query just to get it over with now so we won't pay
|
||||
# the cost in git to look up each individual file.
|
||||
my $o = watchman_clock();
|
||||
$error = $output->{error};
|
||||
|
||||
die "Watchman: $error.\n" .
|
||||
"Falling back to scanning...\n" if $error;
|
||||
|
||||
output_result($o->{clock}, ("/"));
|
||||
$last_update_token = $o->{clock};
|
||||
|
||||
eval { launch_watchman() };
|
||||
return 0;
|
||||
}
|
||||
|
||||
die "Watchman: $error.\n" .
|
||||
"Falling back to scanning...\n" if $error;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub get_working_dir {
|
||||
my $working_dir;
|
||||
if ($^O =~ 'msys' || $^O =~ 'cygwin') {
|
||||
$working_dir = Win32::GetCwd();
|
||||
$working_dir =~ tr/\\/\//;
|
||||
} else {
|
||||
require Cwd;
|
||||
$working_dir = Cwd::cwd();
|
||||
}
|
||||
|
||||
return $working_dir;
|
||||
}
|
8
repo/caddy-bin/caddy-dist/hooks/post-update.sample
Executable file
8
repo/caddy-bin/caddy-dist/hooks/post-update.sample
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to prepare a packed repository for use over
|
||||
# dumb transports.
|
||||
#
|
||||
# To enable this hook, rename this file to "post-update".
|
||||
|
||||
exec git update-server-info
|
14
repo/caddy-bin/caddy-dist/hooks/pre-applypatch.sample
Executable file
14
repo/caddy-bin/caddy-dist/hooks/pre-applypatch.sample
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to verify what is about to be committed
|
||||
# by applypatch from an e-mail message.
|
||||
#
|
||||
# The hook should exit with non-zero status after issuing an
|
||||
# appropriate message if it wants to stop the commit.
|
||||
#
|
||||
# To enable this hook, rename this file to "pre-applypatch".
|
||||
|
||||
. git-sh-setup
|
||||
precommit="$(git rev-parse --git-path hooks/pre-commit)"
|
||||
test -x "$precommit" && exec "$precommit" ${1+"$@"}
|
||||
:
|
49
repo/caddy-bin/caddy-dist/hooks/pre-commit.sample
Executable file
49
repo/caddy-bin/caddy-dist/hooks/pre-commit.sample
Executable file
@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to verify what is about to be committed.
|
||||
# Called by "git commit" with no arguments. The hook should
|
||||
# exit with non-zero status after issuing an appropriate message if
|
||||
# it wants to stop the commit.
|
||||
#
|
||||
# To enable this hook, rename this file to "pre-commit".
|
||||
|
||||
if git rev-parse --verify HEAD >/dev/null 2>&1
|
||||
then
|
||||
against=HEAD
|
||||
else
|
||||
# Initial commit: diff against an empty tree object
|
||||
against=$(git hash-object -t tree /dev/null)
|
||||
fi
|
||||
|
||||
# If you want to allow non-ASCII filenames set this variable to true.
|
||||
allownonascii=$(git config --type=bool hooks.allownonascii)
|
||||
|
||||
# Redirect output to stderr.
|
||||
exec 1>&2
|
||||
|
||||
# Cross platform projects tend to avoid non-ASCII filenames; prevent
|
||||
# them from being added to the repository. We exploit the fact that the
|
||||
# printable range starts at the space character and ends with tilde.
|
||||
if [ "$allownonascii" != "true" ] &&
|
||||
# Note that the use of brackets around a tr range is ok here, (it's
|
||||
# even required, for portability to Solaris 10's /usr/bin/tr), since
|
||||
# the square bracket bytes happen to fall in the designated range.
|
||||
test $(git diff --cached --name-only --diff-filter=A -z $against |
|
||||
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
|
||||
then
|
||||
cat <<\EOF
|
||||
Error: Attempt to add a non-ASCII file name.
|
||||
|
||||
This can cause problems if you want to work with people on other platforms.
|
||||
|
||||
To be portable it is advisable to rename the file.
|
||||
|
||||
If you know what you are doing you can disable this check using:
|
||||
|
||||
git config hooks.allownonascii true
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If there are whitespace errors, print the offending file names and fail.
|
||||
exec git diff-index --check --cached $against --
|
13
repo/caddy-bin/caddy-dist/hooks/pre-merge-commit.sample
Executable file
13
repo/caddy-bin/caddy-dist/hooks/pre-merge-commit.sample
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to verify what is about to be committed.
|
||||
# Called by "git merge" with no arguments. The hook should
|
||||
# exit with non-zero status after issuing an appropriate message to
|
||||
# stderr if it wants to stop the merge commit.
|
||||
#
|
||||
# To enable this hook, rename this file to "pre-merge-commit".
|
||||
|
||||
. git-sh-setup
|
||||
test -x "$GIT_DIR/hooks/pre-commit" &&
|
||||
exec "$GIT_DIR/hooks/pre-commit"
|
||||
:
|
53
repo/caddy-bin/caddy-dist/hooks/pre-push.sample
Executable file
53
repo/caddy-bin/caddy-dist/hooks/pre-push.sample
Executable file
@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
|
||||
# An example hook script to verify what is about to be pushed. Called by "git
|
||||
# push" after it has checked the remote status, but before anything has been
|
||||
# pushed. If this script exits with a non-zero status nothing will be pushed.
|
||||
#
|
||||
# This hook is called with the following parameters:
|
||||
#
|
||||
# $1 -- Name of the remote to which the push is being done
|
||||
# $2 -- URL to which the push is being done
|
||||
#
|
||||
# If pushing without using a named remote those arguments will be equal.
|
||||
#
|
||||
# Information about the commits which are being pushed is supplied as lines to
|
||||
# the standard input in the form:
|
||||
#
|
||||
# <local ref> <local oid> <remote ref> <remote oid>
|
||||
#
|
||||
# This sample shows how to prevent push of commits where the log message starts
|
||||
# with "WIP" (work in progress).
|
||||
|
||||
remote="$1"
|
||||
url="$2"
|
||||
|
||||
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
|
||||
|
||||
while read local_ref local_oid remote_ref remote_oid
|
||||
do
|
||||
if test "$local_oid" = "$zero"
|
||||
then
|
||||
# Handle delete
|
||||
:
|
||||
else
|
||||
if test "$remote_oid" = "$zero"
|
||||
then
|
||||
# New branch, examine all commits
|
||||
range="$local_oid"
|
||||
else
|
||||
# Update to existing branch, examine new commits
|
||||
range="$remote_oid..$local_oid"
|
||||
fi
|
||||
|
||||
# Check for WIP commit
|
||||
commit=$(git rev-list -n 1 --grep '^WIP' "$range")
|
||||
if test -n "$commit"
|
||||
then
|
||||
echo >&2 "Found WIP commit in $local_ref, not pushing"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
169
repo/caddy-bin/caddy-dist/hooks/pre-rebase.sample
Executable file
169
repo/caddy-bin/caddy-dist/hooks/pre-rebase.sample
Executable file
@ -0,0 +1,169 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2006, 2008 Junio C Hamano
|
||||
#
|
||||
# The "pre-rebase" hook is run just before "git rebase" starts doing
|
||||
# its job, and can prevent the command from running by exiting with
|
||||
# non-zero status.
|
||||
#
|
||||
# The hook is called with the following parameters:
|
||||
#
|
||||
# $1 -- the upstream the series was forked from.
|
||||
# $2 -- the branch being rebased (or empty when rebasing the current branch).
|
||||
#
|
||||
# This sample shows how to prevent topic branches that are already
|
||||
# merged to 'next' branch from getting rebased, because allowing it
|
||||
# would result in rebasing already published history.
|
||||
|
||||
publish=next
|
||||
basebranch="$1"
|
||||
if test "$#" = 2
|
||||
then
|
||||
topic="refs/heads/$2"
|
||||
else
|
||||
topic=`git symbolic-ref HEAD` ||
|
||||
exit 0 ;# we do not interrupt rebasing detached HEAD
|
||||
fi
|
||||
|
||||
case "$topic" in
|
||||
refs/heads/??/*)
|
||||
;;
|
||||
*)
|
||||
exit 0 ;# we do not interrupt others.
|
||||
;;
|
||||
esac
|
||||
|
||||
# Now we are dealing with a topic branch being rebased
|
||||
# on top of master. Is it OK to rebase it?
|
||||
|
||||
# Does the topic really exist?
|
||||
git show-ref -q "$topic" || {
|
||||
echo >&2 "No such branch $topic"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Is topic fully merged to master?
|
||||
not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
|
||||
if test -z "$not_in_master"
|
||||
then
|
||||
echo >&2 "$topic is fully merged to master; better remove it."
|
||||
exit 1 ;# we could allow it, but there is no point.
|
||||
fi
|
||||
|
||||
# Is topic ever merged to next? If so you should not be rebasing it.
|
||||
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
|
||||
only_next_2=`git rev-list ^master ${publish} | sort`
|
||||
if test "$only_next_1" = "$only_next_2"
|
||||
then
|
||||
not_in_topic=`git rev-list "^$topic" master`
|
||||
if test -z "$not_in_topic"
|
||||
then
|
||||
echo >&2 "$topic is already up to date with master"
|
||||
exit 1 ;# we could allow it, but there is no point.
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
|
||||
/usr/bin/perl -e '
|
||||
my $topic = $ARGV[0];
|
||||
my $msg = "* $topic has commits already merged to public branch:\n";
|
||||
my (%not_in_next) = map {
|
||||
/^([0-9a-f]+) /;
|
||||
($1 => 1);
|
||||
} split(/\n/, $ARGV[1]);
|
||||
for my $elem (map {
|
||||
/^([0-9a-f]+) (.*)$/;
|
||||
[$1 => $2];
|
||||
} split(/\n/, $ARGV[2])) {
|
||||
if (!exists $not_in_next{$elem->[0]}) {
|
||||
if ($msg) {
|
||||
print STDERR $msg;
|
||||
undef $msg;
|
||||
}
|
||||
print STDERR " $elem->[1]\n";
|
||||
}
|
||||
}
|
||||
' "$topic" "$not_in_next" "$not_in_master"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
<<\DOC_END
|
||||
|
||||
This sample hook safeguards topic branches that have been
|
||||
published from being rewound.
|
||||
|
||||
The workflow assumed here is:
|
||||
|
||||
* Once a topic branch forks from "master", "master" is never
|
||||
merged into it again (either directly or indirectly).
|
||||
|
||||
* Once a topic branch is fully cooked and merged into "master",
|
||||
it is deleted. If you need to build on top of it to correct
|
||||
earlier mistakes, a new topic branch is created by forking at
|
||||
the tip of the "master". This is not strictly necessary, but
|
||||
it makes it easier to keep your history simple.
|
||||
|
||||
* Whenever you need to test or publish your changes to topic
|
||||
branches, merge them into "next" branch.
|
||||
|
||||
The script, being an example, hardcodes the publish branch name
|
||||
to be "next", but it is trivial to make it configurable via
|
||||
$GIT_DIR/config mechanism.
|
||||
|
||||
With this workflow, you would want to know:
|
||||
|
||||
(1) ... if a topic branch has ever been merged to "next". Young
|
||||
topic branches can have stupid mistakes you would rather
|
||||
clean up before publishing, and things that have not been
|
||||
merged into other branches can be easily rebased without
|
||||
affecting other people. But once it is published, you would
|
||||
not want to rewind it.
|
||||
|
||||
(2) ... if a topic branch has been fully merged to "master".
|
||||
Then you can delete it. More importantly, you should not
|
||||
build on top of it -- other people may already want to
|
||||
change things related to the topic as patches against your
|
||||
"master", so if you need further changes, it is better to
|
||||
fork the topic (perhaps with the same name) afresh from the
|
||||
tip of "master".
|
||||
|
||||
Let's look at this example:
|
||||
|
||||
o---o---o---o---o---o---o---o---o---o "next"
|
||||
/ / / /
|
||||
/ a---a---b A / /
|
||||
/ / / /
|
||||
/ / c---c---c---c B /
|
||||
/ / / \ /
|
||||
/ / / b---b C \ /
|
||||
/ / / / \ /
|
||||
---o---o---o---o---o---o---o---o---o---o---o "master"
|
||||
|
||||
|
||||
A, B and C are topic branches.
|
||||
|
||||
* A has one fix since it was merged up to "next".
|
||||
|
||||
* B has finished. It has been fully merged up to "master" and "next",
|
||||
and is ready to be deleted.
|
||||
|
||||
* C has not merged to "next" at all.
|
||||
|
||||
We would want to allow C to be rebased, refuse A, and encourage
|
||||
B to be deleted.
|
||||
|
||||
To compute (1):
|
||||
|
||||
git rev-list ^master ^topic next
|
||||
git rev-list ^master next
|
||||
|
||||
if these match, topic has not merged in next at all.
|
||||
|
||||
To compute (2):
|
||||
|
||||
git rev-list master..topic
|
||||
|
||||
if this is empty, it is fully merged to "master".
|
||||
|
||||
DOC_END
|
24
repo/caddy-bin/caddy-dist/hooks/pre-receive.sample
Executable file
24
repo/caddy-bin/caddy-dist/hooks/pre-receive.sample
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to make use of push options.
|
||||
# The example simply echoes all push options that start with 'echoback='
|
||||
# and rejects all pushes when the "reject" push option is used.
|
||||
#
|
||||
# To enable this hook, rename this file to "pre-receive".
|
||||
|
||||
if test -n "$GIT_PUSH_OPTION_COUNT"
|
||||
then
|
||||
i=0
|
||||
while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
|
||||
do
|
||||
eval "value=\$GIT_PUSH_OPTION_$i"
|
||||
case "$value" in
|
||||
echoback=*)
|
||||
echo "echo from the pre-receive-hook: ${value#*=}" >&2
|
||||
;;
|
||||
reject)
|
||||
exit 1
|
||||
esac
|
||||
i=$((i + 1))
|
||||
done
|
||||
fi
|
42
repo/caddy-bin/caddy-dist/hooks/prepare-commit-msg.sample
Executable file
42
repo/caddy-bin/caddy-dist/hooks/prepare-commit-msg.sample
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to prepare the commit log message.
|
||||
# Called by "git commit" with the name of the file that has the
|
||||
# commit message, followed by the description of the commit
|
||||
# message's source. The hook's purpose is to edit the commit
|
||||
# message file. If the hook fails with a non-zero status,
|
||||
# the commit is aborted.
|
||||
#
|
||||
# To enable this hook, rename this file to "prepare-commit-msg".
|
||||
|
||||
# This hook includes three examples. The first one removes the
|
||||
# "# Please enter the commit message..." help message.
|
||||
#
|
||||
# The second includes the output of "git diff --name-status -r"
|
||||
# into the message, just before the "git status" output. It is
|
||||
# commented because it doesn't cope with --amend or with squashed
|
||||
# commits.
|
||||
#
|
||||
# The third example adds a Signed-off-by line to the message, that can
|
||||
# still be edited. This is rarely a good idea.
|
||||
|
||||
COMMIT_MSG_FILE=$1
|
||||
COMMIT_SOURCE=$2
|
||||
SHA1=$3
|
||||
|
||||
/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
|
||||
|
||||
# case "$COMMIT_SOURCE,$SHA1" in
|
||||
# ,|template,)
|
||||
# /usr/bin/perl -i.bak -pe '
|
||||
# print "\n" . `git diff --cached --name-status -r`
|
||||
# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
|
||||
# *) ;;
|
||||
# esac
|
||||
|
||||
# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
|
||||
# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
|
||||
# if test -z "$COMMIT_SOURCE"
|
||||
# then
|
||||
# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
|
||||
# fi
|
78
repo/caddy-bin/caddy-dist/hooks/push-to-checkout.sample
Executable file
78
repo/caddy-bin/caddy-dist/hooks/push-to-checkout.sample
Executable file
@ -0,0 +1,78 @@
|
||||
#!/bin/sh
|
||||
|
||||
# An example hook script to update a checked-out tree on a git push.
|
||||
#
|
||||
# This hook is invoked by git-receive-pack(1) when it reacts to git
|
||||
# push and updates reference(s) in its repository, and when the push
|
||||
# tries to update the branch that is currently checked out and the
|
||||
# receive.denyCurrentBranch configuration variable is set to
|
||||
# updateInstead.
|
||||
#
|
||||
# By default, such a push is refused if the working tree and the index
|
||||
# of the remote repository has any difference from the currently
|
||||
# checked out commit; when both the working tree and the index match
|
||||
# the current commit, they are updated to match the newly pushed tip
|
||||
# of the branch. This hook is to be used to override the default
|
||||
# behaviour; however the code below reimplements the default behaviour
|
||||
# as a starting point for convenient modification.
|
||||
#
|
||||
# The hook receives the commit with which the tip of the current
|
||||
# branch is going to be updated:
|
||||
commit=$1
|
||||
|
||||
# It can exit with a non-zero status to refuse the push (when it does
|
||||
# so, it must not modify the index or the working tree).
|
||||
die () {
|
||||
echo >&2 "$*"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Or it can make any necessary changes to the working tree and to the
|
||||
# index to bring them to the desired state when the tip of the current
|
||||
# branch is updated to the new commit, and exit with a zero status.
|
||||
#
|
||||
# For example, the hook can simply run git read-tree -u -m HEAD "$1"
|
||||
# in order to emulate git fetch that is run in the reverse direction
|
||||
# with git push, as the two-tree form of git read-tree -u -m is
|
||||
# essentially the same as git switch or git checkout that switches
|
||||
# branches while keeping the local changes in the working tree that do
|
||||
# not interfere with the difference between the branches.
|
||||
|
||||
# The below is a more-or-less exact translation to shell of the C code
|
||||
# for the default behaviour for git's push-to-checkout hook defined in
|
||||
# the push_to_deploy() function in builtin/receive-pack.c.
|
||||
#
|
||||
# Note that the hook will be executed from the repository directory,
|
||||
# not from the working tree, so if you want to perform operations on
|
||||
# the working tree, you will have to adapt your code accordingly, e.g.
|
||||
# by adding "cd .." or using relative paths.
|
||||
|
||||
if ! git update-index -q --ignore-submodules --refresh
|
||||
then
|
||||
die "Up-to-date check failed"
|
||||
fi
|
||||
|
||||
if ! git diff-files --quiet --ignore-submodules --
|
||||
then
|
||||
die "Working directory has unstaged changes"
|
||||
fi
|
||||
|
||||
# This is a rough translation of:
|
||||
#
|
||||
# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX
|
||||
if git cat-file -e HEAD 2>/dev/null
|
||||
then
|
||||
head=HEAD
|
||||
else
|
||||
head=$(git hash-object -t tree --stdin </dev/null)
|
||||
fi
|
||||
|
||||
if ! git diff-index --quiet --cached --ignore-submodules $head --
|
||||
then
|
||||
die "Working directory has staged changes"
|
||||
fi
|
||||
|
||||
if ! git read-tree -u -m "$commit"
|
||||
then
|
||||
die "Could not update working tree to new HEAD"
|
||||
fi
|
77
repo/caddy-bin/caddy-dist/hooks/sendemail-validate.sample
Executable file
77
repo/caddy-bin/caddy-dist/hooks/sendemail-validate.sample
Executable file
@ -0,0 +1,77 @@
|
||||
#!/bin/sh
|
||||
|
||||
# An example hook script to validate a patch (and/or patch series) before
|
||||
# sending it via email.
|
||||
#
|
||||
# The hook should exit with non-zero status after issuing an appropriate
|
||||
# message if it wants to prevent the email(s) from being sent.
|
||||
#
|
||||
# To enable this hook, rename this file to "sendemail-validate".
|
||||
#
|
||||
# By default, it will only check that the patch(es) can be applied on top of
|
||||
# the default upstream branch without conflicts in a secondary worktree. After
|
||||
# validation (successful or not) of the last patch of a series, the worktree
|
||||
# will be deleted.
|
||||
#
|
||||
# The following config variables can be set to change the default remote and
|
||||
# remote ref that are used to apply the patches against:
|
||||
#
|
||||
# sendemail.validateRemote (default: origin)
|
||||
# sendemail.validateRemoteRef (default: HEAD)
|
||||
#
|
||||
# Replace the TODO placeholders with appropriate checks according to your
|
||||
# needs.
|
||||
|
||||
validate_cover_letter () {
|
||||
file="$1"
|
||||
# TODO: Replace with appropriate checks (e.g. spell checking).
|
||||
true
|
||||
}
|
||||
|
||||
validate_patch () {
|
||||
file="$1"
|
||||
# Ensure that the patch applies without conflicts.
|
||||
git am -3 "$file" || return
|
||||
# TODO: Replace with appropriate checks for this patch
|
||||
# (e.g. checkpatch.pl).
|
||||
true
|
||||
}
|
||||
|
||||
validate_series () {
|
||||
# TODO: Replace with appropriate checks for the whole series
|
||||
# (e.g. quick build, coding style checks, etc.).
|
||||
true
|
||||
}
|
||||
|
||||
# main -------------------------------------------------------------------------
|
||||
|
||||
if test "$GIT_SENDEMAIL_FILE_COUNTER" = 1
|
||||
then
|
||||
remote=$(git config --default origin --get sendemail.validateRemote) &&
|
||||
ref=$(git config --default HEAD --get sendemail.validateRemoteRef) &&
|
||||
worktree=$(mktemp --tmpdir -d sendemail-validate.XXXXXXX) &&
|
||||
git worktree add -fd --checkout "$worktree" "refs/remotes/$remote/$ref" &&
|
||||
git config --replace-all sendemail.validateWorktree "$worktree"
|
||||
else
|
||||
worktree=$(git config --get sendemail.validateWorktree)
|
||||
fi || {
|
||||
echo "sendemail-validate: error: failed to prepare worktree" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
unset GIT_DIR GIT_WORK_TREE
|
||||
cd "$worktree" &&
|
||||
|
||||
if grep -q "^diff --git " "$1"
|
||||
then
|
||||
validate_patch "$1"
|
||||
else
|
||||
validate_cover_letter "$1"
|
||||
fi &&
|
||||
|
||||
if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL"
|
||||
then
|
||||
git config --unset-all sendemail.validateWorktree &&
|
||||
trap 'git worktree remove -ff "$worktree"' EXIT &&
|
||||
validate_series
|
||||
fi
|
128
repo/caddy-bin/caddy-dist/hooks/update.sample
Executable file
128
repo/caddy-bin/caddy-dist/hooks/update.sample
Executable file
@ -0,0 +1,128 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to block unannotated tags from entering.
|
||||
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
|
||||
#
|
||||
# To enable this hook, rename this file to "update".
|
||||
#
|
||||
# Config
|
||||
# ------
|
||||
# hooks.allowunannotated
|
||||
# This boolean sets whether unannotated tags will be allowed into the
|
||||
# repository. By default they won't be.
|
||||
# hooks.allowdeletetag
|
||||
# This boolean sets whether deleting tags will be allowed in the
|
||||
# repository. By default they won't be.
|
||||
# hooks.allowmodifytag
|
||||
# This boolean sets whether a tag may be modified after creation. By default
|
||||
# it won't be.
|
||||
# hooks.allowdeletebranch
|
||||
# This boolean sets whether deleting branches will be allowed in the
|
||||
# repository. By default they won't be.
|
||||
# hooks.denycreatebranch
|
||||
# This boolean sets whether remotely creating branches will be denied
|
||||
# in the repository. By default this is allowed.
|
||||
#
|
||||
|
||||
# --- Command line
|
||||
refname="$1"
|
||||
oldrev="$2"
|
||||
newrev="$3"
|
||||
|
||||
# --- Safety check
|
||||
if [ -z "$GIT_DIR" ]; then
|
||||
echo "Don't run this script from the command line." >&2
|
||||
echo " (if you want, you could supply GIT_DIR then run" >&2
|
||||
echo " $0 <ref> <oldrev> <newrev>)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
|
||||
echo "usage: $0 <ref> <oldrev> <newrev>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# --- Config
|
||||
allowunannotated=$(git config --type=bool hooks.allowunannotated)
|
||||
allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
|
||||
denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
|
||||
allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
|
||||
allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
|
||||
|
||||
# check for no description
|
||||
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
|
||||
case "$projectdesc" in
|
||||
"Unnamed repository"* | "")
|
||||
echo "*** Project description file hasn't been set" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# --- Check types
|
||||
# if $newrev is 0000...0000, it's a commit to delete a ref.
|
||||
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
|
||||
if [ "$newrev" = "$zero" ]; then
|
||||
newrev_type=delete
|
||||
else
|
||||
newrev_type=$(git cat-file -t $newrev)
|
||||
fi
|
||||
|
||||
case "$refname","$newrev_type" in
|
||||
refs/tags/*,commit)
|
||||
# un-annotated tag
|
||||
short_refname=${refname##refs/tags/}
|
||||
if [ "$allowunannotated" != "true" ]; then
|
||||
echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
|
||||
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
refs/tags/*,delete)
|
||||
# delete tag
|
||||
if [ "$allowdeletetag" != "true" ]; then
|
||||
echo "*** Deleting a tag is not allowed in this repository" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
refs/tags/*,tag)
|
||||
# annotated tag
|
||||
if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
|
||||
then
|
||||
echo "*** Tag '$refname' already exists." >&2
|
||||
echo "*** Modifying a tag is not allowed in this repository." >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
refs/heads/*,commit)
|
||||
# branch
|
||||
if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
|
||||
echo "*** Creating a branch is not allowed in this repository" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
refs/heads/*,delete)
|
||||
# delete branch
|
||||
if [ "$allowdeletebranch" != "true" ]; then
|
||||
echo "*** Deleting a branch is not allowed in this repository" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
refs/remotes/*,commit)
|
||||
# tracking branch
|
||||
;;
|
||||
refs/remotes/*,delete)
|
||||
# delete tracking branch
|
||||
if [ "$allowdeletebranch" != "true" ]; then
|
||||
echo "*** Deleting a tracking branch is not allowed in this repository" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# Anything else (is there anything else?)
|
||||
echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# --- Finished
|
||||
exit 0
|
6
repo/caddy-bin/caddy-dist/info/exclude
Normal file
6
repo/caddy-bin/caddy-dist/info/exclude
Normal file
@ -0,0 +1,6 @@
|
||||
# git ls-files --others --exclude-from=.git/info/exclude
|
||||
# Lines that start with '#' are comments.
|
||||
# For a project mostly in C, the following would be a good set of
|
||||
# exclude patterns (uncomment them if you want to use them):
|
||||
# *.[oa]
|
||||
# *~
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
102
repo/caddy-bin/caddy-dist/packed-refs
Normal file
102
repo/caddy-bin/caddy-dist/packed-refs
Normal file
@ -0,0 +1,102 @@
|
||||
# pack-refs with: peeled fully-peeled sorted
|
||||
b633572824e26a07926a89284ddd1f1c49fbf1d6 refs/heads/master
|
||||
458a1906d54d5a308346cba824684aff3845556d refs/heads/new-ci
|
||||
3adafa4a0ce8adaa9c0743fdd4231e2b854e9218 refs/pull/1/head
|
||||
7c5cdb84dbb8ad8b595e5071f7cbb23ae0bf71ea refs/pull/10/head
|
||||
41de4719ff50545a5f66a221cf7c6fdde7eefe00 refs/pull/11/head
|
||||
2712be46fbccddc45ffbc6f4e02d6c8cf647a2c7 refs/pull/12/head
|
||||
d9d527325d20fdd9b51bbf679cf681e137921fbe refs/pull/13/head
|
||||
20517833265864397c6f825bf6002b10a8e488cd refs/pull/14/head
|
||||
38b11f83c605f5c3cedf50c6ba77a41daf4b618c refs/pull/15/head
|
||||
f1739ed790e51a6760c40e732ec3ffd56893d8ee refs/pull/16/head
|
||||
6402b59b8bac1700505ae8717f590c2f37b3dc9d refs/pull/17/head
|
||||
d3871ffe2a6c18111ab55d322ed68b70210b11fb refs/pull/18/head
|
||||
77eacf514f713cd27ea44edec79942c28f4e2838 refs/pull/19/head
|
||||
95dd3fa74dbea7379d005deba1f5f3ca45f1c1ae refs/pull/2/head
|
||||
cd68ca774fa7741c74033bd7ab55a9c80c8358fd refs/pull/20/head
|
||||
ba0a308ba6a4bff6a31319afbd195652c78b4b95 refs/pull/23/head
|
||||
4b006409337473beaed01ebc675873362597415d refs/pull/24/head
|
||||
8dcd4b51645f0e67f2cf43fb4361d1904aafdd8f refs/pull/25/head
|
||||
10391eb4e37a81346173fe7642c927db2a512069 refs/pull/26/head
|
||||
623ef0ee626164db51ccf9b4d3eea4dd03e8de43 refs/pull/27/head
|
||||
7088af11d1facb812c0f473e7baf49c1401c716b refs/pull/3/head
|
||||
af037f92d77a340d03f1ee8e13143d7ebe7f6336 refs/pull/30/head
|
||||
eac493096b4f9c092c3502cd1c2bd7dff38278f7 refs/pull/33/head
|
||||
3f7c88be24817ad97a5786aa3d34aad779dcdb50 refs/pull/34/head
|
||||
54154396313f188a9f04df6d293c120ab275c750 refs/pull/35/head
|
||||
f4b6ee56cd3fa5c54666eab730de9dd1cba92b04 refs/pull/36/head
|
||||
58df1df8ea6700e7f73aec9c35aa83980eeda60b refs/pull/4/head
|
||||
9e66a4931674a0b5441e0fb0608b51ada0f5d33c refs/pull/41/head
|
||||
612ea2404c7d3c7b1e8fda8c43ce6f20a08dc630 refs/pull/46/head
|
||||
5bf41955741d7bee6c24f9bc451feb1a6ac9481b refs/pull/5/head
|
||||
767247ee8d2b6d5c149f8daab8d518069ac2a82a refs/pull/52/head
|
||||
45e85e7f59590dedd58caaad228cdcc497c1ac56 refs/pull/55/head
|
||||
b9cd9a415661430ac5d3f462e054ebdb7371173a refs/pull/57/head
|
||||
f4604754734104e7ed3584051767b94fe416a6b5 refs/pull/58/head
|
||||
c4c9a6acceeedb2be7f969cec7bec224c940fdd2 refs/pull/59/head
|
||||
3a1d47e62096111aabf36ee7d084371efc33a4da refs/pull/6/head
|
||||
ad5250c362188d04919c12c6c298f95e45c3ae3f refs/pull/60/head
|
||||
b67abdcf430f769dad0cd34145eb074b1b391806 refs/pull/61/head
|
||||
44772297a992c0416a17befe088be83d6b66435a refs/pull/64/head
|
||||
8a6f0eb567d786b80c1ed6c53275d8a9470689b1 refs/pull/68/head
|
||||
0979c0be011aa9108b2f226fa4f9a1163cd5fba8 refs/pull/7/head
|
||||
4123f4446d563ce791ed153a8d58067bb4c05767 refs/pull/70/head
|
||||
0b603d1657e04ee76f573155d5b2930406a26c71 refs/pull/73/head
|
||||
96354eca0f7e021c1e5606c90cfed2a42809577f refs/pull/75/head
|
||||
b3b5669e526b925051635644a7f7aeaa248fe1cf refs/pull/77/head
|
||||
2c02f19344f2dc554aedfece841cd6e073f3a89c refs/pull/79/head
|
||||
445228be4374b86f1a3505c446f8338f7b18232e refs/pull/8/head
|
||||
0ef0d3866e69639bc746d39a1c184892c5d9d1df refs/pull/84/head
|
||||
caa4d8d8a5df21a9921e60987f21b5850c06ec29 refs/pull/85/head
|
||||
806b643003c7e7505bb761dc13e96ba69514aa0a refs/pull/86/head
|
||||
4ea58a7427111e125f37fc7bbf4f721888e21e5b refs/pull/87/head
|
||||
29b3c77b009b9055e02c4ad5b9409102cbbb009d refs/pull/88/head
|
||||
1ba6b9ba2334d4578fad624248b1735367d5ab92 refs/pull/88/merge
|
||||
7bcc0981c54b2d3abb8f0740091d39f37300e0c9 refs/pull/89/head
|
||||
928e2815ef638e6374a58b2a5ced18527c9ba6e2 refs/pull/92/head
|
||||
99e75fe1384ad5258f4503260170fcb6f4299555 refs/pull/93/head
|
||||
6358d637095260589a9d0641e5bf806aac82e3cd refs/pull/98/head
|
||||
8bab50f31bb352a9d2b286633f99917192f5fc3f refs/tags/v2.4.4
|
||||
^597770c860101694c8f3c90bbe7f324d6b92a7aa
|
||||
c4d5389b5248bd20da95488e72c6b1197677da1e refs/tags/v2.4.5
|
||||
^2f23e8a67eba98613ba87f2d04768f6b28875386
|
||||
0f9eaec0213a054fe2cf8f4c25e3adf6dcc54d3c refs/tags/v2.4.6
|
||||
^1437431660faa41cca0ae36d206105bd1b9f36af
|
||||
a941b92b6b3f16498fc3835ae8fe2d0ad34705ef refs/tags/v2.5.0
|
||||
^0398315ab67b2d45968227d17e2785d4855ead67
|
||||
6d797f8a3061b80977bec1dc715dec4d74138cdb refs/tags/v2.5.0-beta.1
|
||||
^0398315ab67b2d45968227d17e2785d4855ead67
|
||||
f010b0adeaf5ae1c7ff272c483eaed22b86aee0f refs/tags/v2.5.0-rc.1
|
||||
^0398315ab67b2d45968227d17e2785d4855ead67
|
||||
81a86ff9630aa9d788a060159a2294c94c44366a refs/tags/v2.5.1
|
||||
^69bb1c539b3ee03fc91271a71653a77ca1e9d131
|
||||
667eea69c57d0cee9476aac0b3e4e63a9d7f0dc7 refs/tags/v2.5.2
|
||||
^979e498d6d01e1fe7c22db848a3e3bc65369183f
|
||||
43a1e38b457c7255f1f8e72a4f96b3bc493a2474 refs/tags/v2.6.0
|
||||
^8c5fc6fc265c5d8557f17a18b778c398a2c6f27b
|
||||
ac4b54bf84ca2aaf6bac3d46ddd05554d38f70ea refs/tags/v2.6.0-beta.3
|
||||
^8c5fc6fc265c5d8557f17a18b778c398a2c6f27b
|
||||
1aa7990c0945c36ee9f9b518c9e5a2a830b2d511 refs/tags/v2.6.0-beta.5
|
||||
^8c5fc6fc265c5d8557f17a18b778c398a2c6f27b
|
||||
d9818e7a607fb50922c5f07801bc5195ea951fdb refs/tags/v2.6.1
|
||||
^e06ce615e2da93a5908ca9978a1f992b6fbe2ab5
|
||||
024373f1d683de0a6997eeb0f9b5b051b09f4a44 refs/tags/v2.6.2
|
||||
^b1b186cc2722b7ccecb0a44dc82f81bac52470c4
|
||||
0e53aedc178647b14ef0e403b0a335c75a66f5eb refs/tags/v2.6.3
|
||||
^305fe484cc8a9ac72900e8cc172d652102a87240
|
||||
b0756f15b2035d3e59a9f6f64986c5c9b964e8cb refs/tags/v2.6.4
|
||||
^305fe484cc8a9ac72900e8cc172d652102a87240
|
||||
8d1136daecf0cfe7f4eacbe3dba0b1b3af4acbe6 refs/tags/v2.7.0
|
||||
^5910351159c2995a9a1c911d7879de6ff598d905
|
||||
22c418ed18e1ef6e8df6439a22f2ddcd8d62714e refs/tags/v2.7.0-beta.1
|
||||
^5ded5351fc9f6f35286e38c4552fc2d8b37f4df3
|
||||
78de421c604fd6abee4e312ca86ff3e7eb45c537 refs/tags/v2.7.0-beta.2
|
||||
^5910351159c2995a9a1c911d7879de6ff598d905
|
||||
a3401257939bb6c5d7deda719423a80592b432af refs/tags/v2.7.1
|
||||
^5910351159c2995a9a1c911d7879de6ff598d905
|
||||
3769ba2a1325e1583dc022e115552831e1edf436 refs/tags/v2.7.2
|
||||
^5910351159c2995a9a1c911d7879de6ff598d905
|
||||
50ceddcce5a4268e2ada64dff342a94642c043dc refs/tags/v2.7.3
|
||||
^e0c27c3fd74cda546a6d4b89422aee2a17a0ce3a
|
||||
dfd137a475ae1276ba16bade0f95258d9daf0e50 refs/tags/v2.7.4
|
||||
^0c7fa00a87c65a6ef47ed36d841cd223682a2a2c
|
72
repo/caddy-bin/caddy.service
Normal file
72
repo/caddy-bin/caddy.service
Normal file
@ -0,0 +1,72 @@
|
||||
# caddy.service
|
||||
#
|
||||
# For using Caddy with a config file.
|
||||
#
|
||||
# Make sure the ExecStart and ExecReload commands are correct
|
||||
# for your installation.
|
||||
#
|
||||
# See https://caddyserver.com/docs/install for instructions.
|
||||
#
|
||||
# WARNING: This service does not use the --resume flag, so if you
|
||||
# use the API to make changes, they will be overwritten by the
|
||||
# Caddyfile next time the service is restarted. If you intend to
|
||||
# use Caddy's API to configure it, add the --resume flag to the
|
||||
# `caddy run` command or use the caddy-api.service file instead.
|
||||
|
||||
[Unit]
|
||||
Description=Caddy web server
|
||||
Documentation=https://caddyserver.com/docs/
|
||||
After=network-online.target
|
||||
Wants=network-online.target systemd-networkd-wait-online.service
|
||||
StartLimitIntervalSec=14400
|
||||
StartLimitBurst=10
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
User=caddy
|
||||
Group=caddy
|
||||
Environment=XDG_DATA_HOME=/var/lib
|
||||
Environment=XDG_CONFIG_HOME=/etc
|
||||
ExecStartPre=/usr/bin/caddy validate --config /etc/caddy/Caddyfile
|
||||
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
|
||||
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile --force
|
||||
ExecStopPost=/usr/bin/rm -f /run/caddy/admin.socket
|
||||
|
||||
# Do not allow the process to be restarted in a tight loop. If the
|
||||
# process fails to start, something critical needs to be fixed.
|
||||
Restart=on-abnormal
|
||||
|
||||
# Use graceful shutdown with a reasonable timeout
|
||||
TimeoutStopSec=5s
|
||||
|
||||
LimitNOFILE=1048576
|
||||
LimitNPROC=512
|
||||
|
||||
# Hardening options
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
DevicePolicy=closed
|
||||
LockPersonality=true
|
||||
MemoryAccounting=true
|
||||
MemoryDenyWriteExecute=true
|
||||
NoNewPrivileges=true
|
||||
PrivateDevices=true
|
||||
PrivateTmp=true
|
||||
ProcSubset=pid
|
||||
ProtectClock=true
|
||||
ProtectControlGroups=true
|
||||
ProtectHome=true
|
||||
ProtectHostname=true
|
||||
ProtectKernelLogs=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectProc=invisible
|
||||
ProtectSystem=strict
|
||||
RemoveIPC=true
|
||||
ReadWritePaths=/var/lib/caddy /var/log/caddy /run/caddy
|
||||
RestrictNamespaces=true
|
||||
RestrictRealtime=true
|
||||
RestrictSUIDSGID=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
1
repo/caddy-bin/caddy.sysusers
Normal file
1
repo/caddy-bin/caddy.sysusers
Normal file
@ -0,0 +1 @@
|
||||
u caddy - "caddy daemon" /var/lib/caddy
|
3
repo/caddy-bin/caddy.tmpfiles
Normal file
3
repo/caddy-bin/caddy.tmpfiles
Normal file
@ -0,0 +1,3 @@
|
||||
d /var/lib/caddy 0750 caddy caddy
|
||||
d /var/log/caddy 0750 caddy caddy
|
||||
d /run/caddy 0750 caddy caddy
|
393
repo/caddy-bin/index.html
Normal file
393
repo/caddy-bin/index.html
Normal file
@ -0,0 +1,393 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Caddy works!</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="data:,">
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #f1f4f5;
|
||||
font-family: Inter, sans-serif;
|
||||
font-size: 20px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #2f79ff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.stack {
|
||||
width: 70%;
|
||||
max-width: 1150px;
|
||||
margin: 25px 0 150px 25px;
|
||||
display: flex;
|
||||
align-content: flex-start;
|
||||
}
|
||||
|
||||
.paper {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
width: 100%;
|
||||
|
||||
background: white;
|
||||
border-radius: 3px;
|
||||
box-shadow: 1px 2px 4px 1px rgba(0, 0, 0, .15);
|
||||
padding: 100px;
|
||||
}
|
||||
|
||||
#paper1 {
|
||||
top: 45px;
|
||||
left: 50px;
|
||||
}
|
||||
|
||||
#paper2 {
|
||||
top: 20px;
|
||||
left: -100%;
|
||||
}
|
||||
|
||||
#paper3 {
|
||||
top: 25px;
|
||||
transform: rotate(-4deg);
|
||||
left: -200%;
|
||||
}
|
||||
|
||||
#caddy {
|
||||
max-width: 300px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
#caddy .caddy-color {
|
||||
fill: #005e7e;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 20px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
h1 .emoji {
|
||||
font-size: 150%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
h1 .lang {
|
||||
margin-right: 1.25em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 28px;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
|
||||
p,
|
||||
ol,
|
||||
ul {
|
||||
color: #333;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 1.5em 0;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
margin: .5em 0 .5em 2em;
|
||||
}
|
||||
|
||||
ol li,
|
||||
ul li {
|
||||
margin-left: 1em;
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
||||
li ol {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
code {
|
||||
color: #000;
|
||||
font-family: Menlo, monospace;
|
||||
background: #f0f0f0;
|
||||
border-radius: 2px;
|
||||
padding: 4px 8px;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.warn {
|
||||
color: #dd0000;
|
||||
}
|
||||
|
||||
footer {
|
||||
color: #777;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
max-width: 600px;
|
||||
margin: 0 auto 50px;
|
||||
}
|
||||
|
||||
#disclaimer {
|
||||
font-size: 14px;
|
||||
margin-top: 20px;
|
||||
display: inline-block;
|
||||
border-top: 1px solid #ccc;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
.stack {
|
||||
width: 85%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.stack {
|
||||
margin: 0 0 50px 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.paper {
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
#paper1,
|
||||
#paper2 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#paper3 {
|
||||
left: 0;
|
||||
transform: none;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
#caddy {
|
||||
max-width: 300px;
|
||||
margin-bottom: 45px;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="stack">
|
||||
<div class="paper" id="paper1"></div>
|
||||
<div class="paper" id="paper2"></div>
|
||||
<div class="paper" id="paper3">
|
||||
<a href="https://caddyserver.com/" title="Caddy Web Server">
|
||||
<svg id="caddy" viewBox="0 0 379 114" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/"
|
||||
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;">
|
||||
<g transform="matrix(1,0,0,1,-35.5985,-67.948)">
|
||||
<g transform="matrix(1.16548,0,0,1.10195,-124,-68.27)">
|
||||
<g id="Light-Logo" serif:id="Light Logo"
|
||||
transform="matrix(0.858013,0,0,0.907485,-3243.42,-1469.17)">
|
||||
<g id="Logo" transform="matrix(1,0,0,1,21.4759,36.7359)">
|
||||
<g id="Icon">
|
||||
<g>
|
||||
<g
|
||||
transform="matrix(-0.191794,-0.715786,0.715786,-0.191794,4329.14,4673.64)">
|
||||
<path
|
||||
d="M3901.56,610.734C3893.53,610.261 3886.06,608.1 3879.2,604.877C3872.24,601.608 3866.04,597.093 3860.8,591.633C3858.71,589.457 3856.76,587.149 3854.97,584.709C3853.2,582.281 3851.57,579.733 3850.13,577.066C3845.89,569.224 3843.21,560.381 3842.89,550.868C3842.57,543.321 3843.64,536.055 3845.94,529.307C3848.37,522.203 3852.08,515.696 3856.83,510.049L3855.79,509.095C3850.39,514.54 3846.02,520.981 3842.9,528.125C3839.84,535.125 3838.03,542.781 3837.68,550.868C3837.34,561.391 3839.51,571.425 3843.79,580.306C3845.27,583.38 3847.03,586.304 3849.01,589.049C3851.01,591.806 3853.24,594.39 3855.69,596.742C3861.75,602.568 3869,607.19 3877.03,610.1C3884.66,612.867 3892.96,614.059 3901.56,613.552L3901.56,610.734Z"
|
||||
style="fill:rgb(31,136,192);" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(-0.191794,-0.715786,0.715786,-0.191794,4329.14,4673.64)">
|
||||
<path
|
||||
d="M3875.69,496.573C3879.62,494.538 3883.8,492.897 3888.2,491.786C3892.49,490.704 3896.96,490.124 3901.56,490.032C3903.82,490.13 3906.03,490.332 3908.21,490.688C3917.13,492.147 3925.19,495.814 3932.31,500.683C3936.13,503.294 3939.59,506.335 3942.81,509.619C3947.09,513.98 3950.89,518.816 3953.85,524.232C3958.2,532.197 3960.96,541.186 3961.32,550.868C3961.61,558.748 3960.46,566.345 3957.88,573.322C3956.09,578.169 3953.7,582.753 3950.66,586.838C3947.22,591.461 3942.96,595.427 3938.27,598.769C3933.66,602.055 3928.53,604.619 3923.09,606.478C3922.37,606.721 3921.6,606.805 3920.93,607.167C3920.42,607.448 3920.14,607.854 3919.69,608.224L3920.37,610.389C3920.98,610.432 3921.47,610.573 3922.07,610.474C3922.86,610.344 3923.55,609.883 3924.28,609.566C3931.99,606.216 3938.82,601.355 3944.57,595.428C3947.02,592.903 3949.25,590.174 3951.31,587.319C3953.59,584.168 3955.66,580.853 3957.43,577.348C3961.47,569.34 3964.01,560.422 3964.36,550.868C3964.74,540.511 3962.66,530.628 3958.48,521.868C3955.57,515.775 3951.72,510.163 3946.95,505.478C3943.37,501.962 3939.26,498.99 3934.84,496.562C3926.88,492.192 3917.87,489.76 3908.37,489.229C3906.12,489.104 3903.86,489.054 3901.56,489.154C3896.87,489.06 3892.3,489.519 3887.89,490.397C3883.3,491.309 3878.89,492.683 3874.71,494.525L3875.69,496.573Z"
|
||||
style="fill:rgb(31,136,192);" />
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g transform="matrix(-3.37109,-0.514565,0.514565,-3.37109,4078.07,1806.88)">
|
||||
<path
|
||||
d="M22,12C22,10.903 21.097,10 20,10C19.421,10 18.897,10.251 18.53,10.649C18.202,11.006 18,11.481 18,12C18,13.097 18.903,14 20,14C21.097,14 22,13.097 22,12Z"
|
||||
style="fill:none;fill-rule:nonzero;stroke:rgb(31,136,192);stroke-width:1.05px;" />
|
||||
</g>
|
||||
<g transform="matrix(-5.33921,-5.26159,-3.12106,-6.96393,4073.87,1861.55)">
|
||||
<path
|
||||
d="M10.315,5.333C10.315,5.333 9.748,5.921 9.03,6.673C7.768,7.995 6.054,9.805 6.054,9.805L6.237,9.86C6.237,9.86 8.045,8.077 9.36,6.771C10.107,6.028 10.689,5.444 10.689,5.444L10.315,5.333Z"
|
||||
style="fill:rgb(31,136,192);" />
|
||||
</g>
|
||||
</g>
|
||||
<g id="Padlock" transform="matrix(3.11426,0,0,3.11426,3938.31,1737.25)">
|
||||
<g>
|
||||
<path
|
||||
d="M9.876,21L18.162,21C18.625,21 19,20.625 19,20.162L19,11.838C19,11.375 18.625,11 18.162,11L5.838,11C5.375,11 5,11.375 5,11.838L5,16.758"
|
||||
style="fill:none;stroke:rgb(34,182,56);stroke-width:1.89px;stroke-linecap:butt;stroke-linejoin:miter;" />
|
||||
<path d="M8,11L8,7C8,4.806 9.806,3 12,3C14.194,3 16,4.806 16,7L16,11"
|
||||
style="fill:none;fill-rule:nonzero;stroke:rgb(34,182,56);stroke-width:1.89px;" />
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g transform="matrix(5.30977,0.697415,-0.697415,5.30977,3852.72,1727.97)">
|
||||
<path
|
||||
d="M22,12C22,11.659 21.913,11.337 21.76,11.055C21.421,10.429 20.756,10 20,10C18.903,10 18,10.903 18,12C18,13.097 18.903,14 20,14C21.097,14 22,13.097 22,12Z"
|
||||
style="fill:none;fill-rule:nonzero;stroke:rgb(31,136,192);stroke-width:0.98px;" />
|
||||
</g>
|
||||
<g transform="matrix(4.93114,2.49604,1.11018,5.44847,3921.41,1726.72)">
|
||||
<path
|
||||
d="M8.902,6.77C8.902,6.77 7.235,8.253 6.027,9.366C5.343,9.996 4.819,10.502 4.819,10.502L5.52,11.164C5.52,11.164 6.021,10.637 6.646,9.951C7.749,8.739 9.219,7.068 9.219,7.068L8.902,6.77Z"
|
||||
style="fill:rgb(31,136,192);" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="Wordmark" transform="matrix(1.54159,0,0,2.8744,2710.6,709.804)">
|
||||
<g id="y" transform="matrix(0.50291,0,0,0.281607,905.533,304.987)">
|
||||
<path
|
||||
d="M192.152,286.875L202.629,268.64C187.804,270.106 183.397,265.779 180.143,263.391C176.888,261.004 174.362,257.99 172.563,254.347C170.765,250.705 169.866,246.691 169.866,242.305L169.866,208.107L183.21,208.107L183.21,242.213C183.21,245.188 183.896,247.822 185.268,250.116C186.64,252.41 188.465,254.197 190.743,255.475C193.022,256.754 195.501,257.393 198.182,257.393C200.894,257.393 203.393,256.75 205.68,255.463C207.966,254.177 209.799,252.391 211.178,250.105C212.558,247.818 213.248,245.188 213.248,242.213L213.248,208.107L226.545,208.107L226.545,242.305C226.545,246.707 225.378,258.46 218.079,268.64C215.735,271.909 207.835,286.875 207.835,286.875L192.152,286.875Z"
|
||||
style="fill:rgb(47,47,47);fill-rule:nonzero;" />
|
||||
</g>
|
||||
<g id="add" transform="matrix(0.525075,0,0,0.281607,801.871,304.987)">
|
||||
<g transform="matrix(116.242,0,0,116.242,161.846,267.39)">
|
||||
<path
|
||||
d="M0.276,0.012C0.227,0.012 0.186,0 0.15,-0.024C0.115,-0.048 0.088,-0.08 0.069,-0.12C0.05,-0.161 0.04,-0.205 0.04,-0.254C0.04,-0.305 0.051,-0.35 0.072,-0.39C0.094,-0.431 0.125,-0.463 0.165,-0.487C0.205,-0.51 0.254,-0.522 0.31,-0.522C0.366,-0.522 0.413,-0.51 0.452,-0.486C0.491,-0.463 0.521,-0.431 0.542,-0.39C0.562,-0.35 0.573,-0.305 0.573,-0.256L0.573,-0L0.458,-0L0.458,-0.095L0.456,-0.095C0.446,-0.076 0.433,-0.058 0.417,-0.042C0.401,-0.026 0.381,-0.013 0.358,-0.003C0.335,0.007 0.307,0.012 0.276,0.012ZM0.307,-0.086C0.337,-0.086 0.363,-0.093 0.386,-0.108C0.408,-0.123 0.426,-0.144 0.438,-0.17C0.45,-0.195 0.456,-0.224 0.456,-0.256C0.456,-0.288 0.45,-0.317 0.438,-0.342C0.426,-0.367 0.409,-0.387 0.387,-0.402C0.365,-0.417 0.338,-0.424 0.308,-0.424C0.276,-0.424 0.249,-0.417 0.226,-0.402C0.204,-0.387 0.186,-0.366 0.174,-0.341C0.162,-0.315 0.156,-0.287 0.156,-0.255C0.156,-0.224 0.162,-0.195 0.174,-0.169C0.186,-0.144 0.203,-0.123 0.226,-0.108C0.248,-0.093 0.275,-0.086 0.307,-0.086Z"
|
||||
style="fill:rgb(47,47,47);fill-rule:nonzero;" />
|
||||
</g>
|
||||
<g transform="matrix(116.242,0,0,116.242,226.592,267.39)">
|
||||
<path
|
||||
d="M0.306,0.012C0.265,0.012 0.229,0.006 0.196,-0.008C0.163,-0.021 0.135,-0.039 0.112,-0.064C0.089,-0.088 0.071,-0.117 0.059,-0.151C0.046,-0.185 0.04,-0.222 0.04,-0.263C0.04,-0.315 0.051,-0.36 0.072,-0.399C0.093,-0.437 0.122,-0.468 0.159,-0.489C0.196,-0.511 0.239,-0.522 0.287,-0.522C0.311,-0.522 0.333,-0.518 0.355,-0.511C0.377,-0.504 0.396,-0.493 0.413,-0.48C0.431,-0.466 0.445,-0.451 0.455,-0.433L0.456,-0.433L0.456,-0.73L0.571,-0.73L0.571,-0.261C0.571,-0.205 0.56,-0.156 0.537,-0.115C0.515,-0.074 0.484,-0.043 0.444,-0.021C0.405,0.001 0.358,0.012 0.306,0.012ZM0.306,-0.086C0.335,-0.086 0.361,-0.093 0.384,-0.107C0.406,-0.122 0.423,-0.141 0.436,-0.167C0.448,-0.192 0.455,-0.221 0.455,-0.255C0.455,-0.288 0.448,-0.317 0.436,-0.343C0.423,-0.368 0.406,-0.388 0.383,-0.402C0.361,-0.417 0.335,-0.424 0.305,-0.424C0.276,-0.424 0.251,-0.417 0.228,-0.402C0.206,-0.387 0.188,-0.368 0.175,-0.342C0.163,-0.317 0.156,-0.288 0.156,-0.255C0.156,-0.222 0.163,-0.193 0.175,-0.167C0.188,-0.142 0.206,-0.122 0.229,-0.108C0.251,-0.093 0.277,-0.086 0.306,-0.086Z"
|
||||
style="fill:rgb(47,47,47);fill-rule:nonzero;" />
|
||||
</g>
|
||||
<g transform="matrix(116.242,0,0,116.242,290.293,267.39)">
|
||||
<path
|
||||
d="M0.306,0.012C0.265,0.012 0.229,0.006 0.196,-0.008C0.163,-0.021 0.135,-0.039 0.112,-0.064C0.089,-0.088 0.071,-0.117 0.059,-0.151C0.046,-0.185 0.04,-0.222 0.04,-0.263C0.04,-0.315 0.051,-0.36 0.072,-0.399C0.093,-0.437 0.122,-0.468 0.159,-0.489C0.196,-0.511 0.239,-0.522 0.287,-0.522C0.311,-0.522 0.333,-0.518 0.355,-0.511C0.377,-0.504 0.396,-0.493 0.413,-0.48C0.431,-0.466 0.445,-0.451 0.455,-0.433L0.456,-0.433L0.456,-0.73L0.571,-0.73L0.571,-0.261C0.571,-0.205 0.56,-0.156 0.537,-0.115C0.515,-0.074 0.484,-0.043 0.444,-0.021C0.405,0.001 0.358,0.012 0.306,0.012ZM0.306,-0.086C0.335,-0.086 0.361,-0.093 0.384,-0.107C0.406,-0.122 0.423,-0.141 0.436,-0.167C0.448,-0.192 0.455,-0.221 0.455,-0.255C0.455,-0.288 0.448,-0.317 0.436,-0.343C0.423,-0.368 0.406,-0.388 0.383,-0.402C0.361,-0.417 0.335,-0.424 0.305,-0.424C0.276,-0.424 0.251,-0.417 0.228,-0.402C0.206,-0.387 0.188,-0.368 0.175,-0.342C0.163,-0.317 0.156,-0.288 0.156,-0.255C0.156,-0.222 0.163,-0.193 0.175,-0.167C0.188,-0.142 0.206,-0.122 0.229,-0.108C0.251,-0.093 0.277,-0.086 0.306,-0.086Z"
|
||||
style="fill:rgb(47,47,47);fill-rule:nonzero;" />
|
||||
</g>
|
||||
</g>
|
||||
<g id="c"
|
||||
transform="matrix(-0.0716462,0.31304,-0.583685,-0.0384251,1489.76,-444.051)">
|
||||
<path
|
||||
d="M2668.11,700.4C2666.79,703.699 2666.12,707.216 2666.12,710.766C2666.12,726.268 2678.71,738.854 2694.21,738.854C2709.71,738.854 2722.3,726.268 2722.3,710.766C2722.3,704.111 2719.93,697.672 2715.63,692.597L2707.63,699.378C2710.33,702.559 2711.57,706.602 2711.81,710.766C2712.2,717.38 2706.61,724.52 2697.27,726.637C2683.9,728.581 2676.61,720.482 2676.61,710.766C2676.61,708.541 2677.03,706.336 2677.85,704.269L2668.11,700.4Z"
|
||||
style="fill:rgb(46,46,46);" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="R" transform="matrix(0.497016,0,0,0.497016,2390.38,823.152)">
|
||||
<g transform="matrix(1,0,0,1,-0.10786,0.450801)">
|
||||
<g transform="matrix(12.1247,0,0,12.1247,3862.61,1929.9)">
|
||||
<path
|
||||
d="M0.073,-0L0.073,-0.7L0.383,-0.7C0.428,-0.7 0.469,-0.69 0.506,-0.67C0.543,-0.651 0.572,-0.623 0.594,-0.588C0.616,-0.553 0.627,-0.512 0.627,-0.465C0.627,-0.418 0.615,-0.377 0.592,-0.342C0.569,-0.306 0.539,-0.279 0.501,-0.259L0.57,-0.128C0.574,-0.12 0.579,-0.115 0.584,-0.111C0.59,-0.107 0.596,-0.106 0.605,-0.106L0.664,-0.106L0.664,-0L0.587,-0C0.56,-0 0.535,-0.007 0.514,-0.02C0.493,-0.034 0.476,-0.052 0.463,-0.075L0.381,-0.232C0.375,-0.231 0.368,-0.231 0.361,-0.231C0.354,-0.231 0.347,-0.231 0.34,-0.231L0.192,-0.231L0.192,-0L0.073,-0ZM0.192,-0.336L0.368,-0.336C0.394,-0.336 0.417,-0.341 0.438,-0.351C0.459,-0.361 0.476,-0.376 0.489,-0.396C0.501,-0.415 0.507,-0.438 0.507,-0.465C0.507,-0.492 0.501,-0.516 0.488,-0.535C0.475,-0.554 0.459,-0.569 0.438,-0.579C0.417,-0.59 0.394,-0.595 0.369,-0.595L0.192,-0.595L0.192,-0.336Z"
|
||||
style="fill:rgb(46,46,46);fill-rule:nonzero;" />
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,0.278569,0.101881)">
|
||||
<circle cx="3866.43" cy="1926.14" r="8.923"
|
||||
style="fill:none;stroke:rgb(46,46,46);stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<h1>
|
||||
<!-- English --> <span class="lang">Congratulations!</span>
|
||||
<!-- Japanese --> <span class="lang">おめでとう!</span>
|
||||
<!-- Spanish --> <span class="lang">Felicidades!</span>
|
||||
<!-- Chinese --> <span class="lang">恭喜!</span>
|
||||
<!-- Hindi --> <span class="lang">बधाई हो!</span>
|
||||
<!-- Russian --> <span class="lang">Поздравляю!</span>
|
||||
<span class="emoji">🎊</span>
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
Your web server is working. Now make it work for you. 💪
|
||||
</p>
|
||||
<p>
|
||||
Caddy is ready to serve your site over HTTPS:
|
||||
</p>
|
||||
<ol>
|
||||
<li>Point your domain's A/AAAA DNS records at this machine.</li>
|
||||
<li>Upload your site's files to <code>/usr/share/caddy</code>.
|
||||
<li>
|
||||
Edit your Caddyfile at <code>/etc/caddy/Caddyfile</code>:
|
||||
<ol>
|
||||
<li>Replace <code>:80</code> with your domain name</li>
|
||||
<li>Change the site root to <code>/usr/share/caddy</code></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>Reload the configuration: <code>systemctl reload caddy</code></li>
|
||||
<li>Visit your site!</li>
|
||||
</ol>
|
||||
<h2>If that worked 🥳</h2>
|
||||
<p>
|
||||
Awesome! You won't have to look at this slanted page anymore.
|
||||
</p>
|
||||
<p>
|
||||
Remember, Caddy can do a lot more than serve static files. It's also a powerful reverse proxy and
|
||||
application platform. You can use the Caddyfile to enable any other features you need. Or you could use
|
||||
Caddy's API to configure it programmatically.
|
||||
</p>
|
||||
<p>
|
||||
Everything you need to know is either in the <a href="https://caddyserver.com/docs/">📖 Caddy
|
||||
documentation</a> or the manual for your OS/platform. Have fun!
|
||||
</p>
|
||||
|
||||
<h2>If that didn't work 😶</h2>
|
||||
<p>
|
||||
It's okay, you can fix it! First check the following things:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Service status: <code>systemctl status caddy</code></li>
|
||||
<li>Logs: <code>journalctl --no-pager -u caddy</code></li>
|
||||
<li>Are your site's files readable by the caddy user and group? <code>ls -la /usr/share/caddy</code></li>
|
||||
<li>Is the caddy home directory writeable? <code>ls -la /var/lib/caddy</code></li>
|
||||
<li>Ensure your domain's A and/or AAAA records point to your machine's public IP address:
|
||||
<code>dig example.com</code></li>
|
||||
<li>Are your ports 80 and 443 externally reachable, and is Caddy able to bind to them? Check your
|
||||
firewalls, port forwarding, and other network configuration.</li>
|
||||
</ul>
|
||||
<p>
|
||||
<b class="warn">WAIT!</b> Before trying again, switch to <a
|
||||
href="https://letsencrypt.org/docs/staging-environment/">Let's Encrypt's staging environment</a> to
|
||||
avoid being accidentally <a href="https://letsencrypt.org/docs/rate-limits/">rate limited</a>. Once you
|
||||
get everything else working, it's safe to switch back.
|
||||
</p>
|
||||
<p>
|
||||
Depending on your DNS provider, it may take a while for the DNS records to propagate. Even when
|
||||
everything is configured properly, automated challenges to obtain TLS certificates usually take several
|
||||
seconds, but may take up to several minutes or hours.
|
||||
<p>
|
||||
If you still need help, we have a <a href="https://caddy.community/">great community</a>! First <a
|
||||
href="https://caddy.community/search">try a search</a>, and if your question is original, go ahead
|
||||
and ask it! Remember to pay it forward and help others too. 😁
|
||||
</p>
|
||||
<p>
|
||||
Visit Caddy on:
|
||||
<b><a href="https://github.com/caddyserver/caddy" title="Caddy on GitHub">GitHub</a></b>
|
||||
or
|
||||
<b><a href="https://twitter.com/caddyserver" title="@caddyserver on Twitter">Twitter</a></b>
|
||||
or
|
||||
<b><a href="https://caddy.community/" title="Caddy forums">Our Forum</a></b>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
© Copyright The Caddy Authors
|
||||
|
||||
<div id="disclaimer">
|
||||
The Caddy project is not responsible for the content, disposition, or behavior of this Web
|
||||
property, which is independently owned and maintained. For inquiries, please contact the site owner or
|
||||
hosting provider.
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user