From af3038fe6d4200e4de0394eb6ca9eeaf448d71fd Mon Sep 17 00:00:00 2001 From: henderkes Date: Thu, 25 Dec 2025 16:04:31 +0100 Subject: [PATCH 01/23] update installation instructions to use php 8.5 and add apk alpine support --- docs/performance.md | 6 +++--- install.sh | 37 +++++++++++++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/docs/performance.md b/docs/performance.md index 7910b2651..b2caab6c1 100644 --- a/docs/performance.md +++ b/docs/performance.md @@ -7,7 +7,7 @@ However, it is possible to substantially improve performance using an appropriat By default, FrankenPHP starts 2 times more threads and workers (in worker mode) than the available numbers of CPU. -The appropriate values depend heavily on how your application is written, what it does and your hardware. +The appropriate values depend heavily on how your application is written, what it does, and your hardware. We strongly recommend changing these values. For best system stability, it is recommended to have `num_threads` x `memory_limit` < `available_memory`. To find the right values, it's best to run load tests simulating real traffic. @@ -43,7 +43,7 @@ Also, [some bugs only happen when using musl](https://github.com/php/php-src/iss In production environments, we recommend using FrankenPHP linked against glibc, compiled with an appropriate optimization level. -This can be achieved by using the Debian Docker images, using our maintainers [.deb](https://debs.henderkes.com) or [.rpm](https://rpms.henderkes.com) packages, or by [compiling FrankenPHP from sources](compile.md). +This can be achieved by using the Debian Docker images, using [our maintainers .deb, .rpm, or .apk packages](https://pkgs.henderkes.com), or by [compiling FrankenPHP from sources](compile.md). ## Go Runtime Configuration @@ -146,7 +146,7 @@ All usual PHP-related performance optimizations apply with FrankenPHP. In particular: -- check that [OPcache](https://www.php.net/manual/en/book.opcache.php) is installed, enabled and properly configured +- check that [OPcache](https://www.php.net/manual/en/book.opcache.php) is installed, enabled, and properly configured - enable [Composer autoloader optimizations](https://getcomposer.org/doc/articles/autoloader-optimization.md) - ensure that the `realpath` cache is big enough for the needs of your application - use [preloading](https://www.php.net/manual/en/opcache.preloading.php) diff --git a/install.sh b/install.sh index eea9fe225..0185a8cce 100755 --- a/install.sh +++ b/install.sh @@ -38,8 +38,8 @@ Linux*) echo "❗ Enter your password to grant sudo powers for package installation" ${SUDO} -v || true fi - ${SUDO} dnf -y install https://rpm.henderkes.com/static-php-1-0.noarch.rpm - ${SUDO} dnf -y module enable php-zts:static-8.4 || true + ${SUDO} dnf -y install https://rpm.henderkes.com/static-php-1-1.noarch.rpm + ${SUDO} dnf -y module enable php-zts:static-8.5 || true ${SUDO} dnf -y install frankenphp echo echo "🥳 FrankenPHP installed to ${italic}/usr/bin/frankenphp${normal} successfully." @@ -56,8 +56,8 @@ Linux*) echo "❗ Enter your password to grant sudo powers for package installation" ${SUDO} -v || true fi - ${SUDO} sh -c 'curl -fsSL https://key.henderkes.com/static-php.gpg -o /usr/share/keyrings/static-php.gpg' - ${SUDO} sh -c 'echo "deb [signed-by=/usr/share/keyrings/static-php.gpg] https://deb.henderkes.com/ stable main" > /etc/apt/sources.list.d/static-php.list' + ${SUDO} sh -c 'curl -fsSL https://pkg.henderkes.com/api/packages/85/debian/repository.key -o /etc/apt/keyrings/static-php85.asc' + ${SUDO} sh -c 'echo "deb [signed-by=/etc/apt/keyrings/static-php85.asc] https://pkg.henderkes.com/api/packages/85/debian php-zts main" | sudo tee -a /etc/apt/sources.list.d/static-php85.list' if command -v apt >/dev/null 2>&1; then ${SUDO} apt update ${SUDO} apt -y install frankenphp @@ -73,6 +73,35 @@ Linux*) echo "⭐ If you like FrankenPHP, please give it a star on GitHub: ${italic}https://github.com/php/frankenphp${normal}" exit 0 fi + + if command -v apk >/dev/null 2>&1; then + echo "📦 Detected apk. Installing FrankenPHP from APK repository..." + if [ -n "${SUDO}" ]; then + echo "❗ Enter your password to grant sudo powers for package installation" + ${SUDO} -v || true + fi + + KEY_URL="https://pkg.henderkes.com/api/packages/85/alpine/key" + ${SUDO} sh -c "cd /etc/apk/keys && curl -JOsS \"$KEY_URL\" 2>/dev/null || true" + + REPO_URL="https://pkg.henderkes.com/api/packages/85/alpine/main/php-zts" + if grep -q "$REPO_URL" /etc/apk/repositories 2>/dev/null; then + echo "Repository already exists in /etc/apk/repositories" + else + ${SUDO} sh -c "echo \"$REPO_URL\" >> /etc/apk/repositories" + ${SUDO} apk update + echo "Repository added to /etc/apk/repositories" + fi + + ${SUDO} apk add frankenphp + echo + echo "🥳 FrankenPHP installed to ${italic}/usr/bin/frankenphp${normal} successfully." + echo "❗ The systemd service uses the Caddyfile in ${italic}/etc/frankenphp/Caddyfile${normal}" + echo "❗ Your php.ini is found in ${italic}/etc/php-zts/php.ini${normal}" + echo + echo "⭐ If you like FrankenPHP, please give it a star on GitHub: ${italic}https://github.com/php/frankenphp${normal}" + exit 0 + fi fi case ${ARCH} in From 164cd88578bbf1549bac2796edaebc854d01627a Mon Sep 17 00:00:00 2001 From: henderkes Date: Thu, 25 Dec 2025 16:34:17 +0100 Subject: [PATCH 02/23] update readme for new apk packages --- README.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a7553fd4d..0a38c97bd 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,9 @@ sudo pie-zts install asgrim/example-pie-extension Our maintainers offer deb packages for all systems using `apt`. To install, run: ```console -sudo curl -fsSL https://key.henderkes.com/static-php.gpg -o /usr/share/keyrings/static-php.gpg && \ -echo "deb [signed-by=/usr/share/keyrings/static-php.gpg] https://deb.henderkes.com/ stable main" | sudo tee /etc/apt/sources.list.d/static-php.list && \ +VERSION=85 # 82-85 available +sudo curl https://pkg.henderkes.com/api/packages/${VERSION}/debian/repository.key -o /etc/apt/keyrings/static-php${VERSION}.asc +echo "deb [signed-by=/etc/apt/keyrings/static-php${VERSION}.asc] https://pkg.henderkes.com/api/packages/${VERSION}/debian php-zts main" | sudo tee -a /etc/apt/sources.list.d/static-php${VERSION}.list sudo apt update sudo apt install frankenphp ``` @@ -75,6 +76,28 @@ sudo apt install pie-zts sudo pie-zts install asgrim/example-pie-extension ``` +### apk Packages + +Our maintainers offer apk packages for all systems using `apk`. To install, run: + +```console +VERSION=85 # 82-85 available +echo "https://pkg.henderkes.com/api/packages/${VERSION}/alpine/main/php-zts" | sudo tee -a /etc/apk/repositories +KEYFILE=$(curl -sJOw '%{filename_effective}' https://pkg.henderkes.com/api/packages/${VERSION}/alpine/key) +sudo mv ${KEYFILE} /etc/apk/keys/ && +sudo apk update && +sudo apk add frankenphp +``` + +**Installing extensions:** `sudo apk add php-zts-` + +For extensions not available by default, use [PIE](https://github.com/php/pie): + +```console +sudo apk add pie-zts +sudo pie-zts install asgrim/example-pie-extension +``` + ### Homebrew FrankenPHP is also available as a [Homebrew](https://brew.sh) package for macOS and Linux. From 5af6b5c6bfa0653f9713f95f4839a43c55007b8a Mon Sep 17 00:00:00 2001 From: henderkes Date: Thu, 25 Dec 2025 16:43:04 +0100 Subject: [PATCH 03/23] openrc service, not systemd --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 0185a8cce..746bf4c6b 100755 --- a/install.sh +++ b/install.sh @@ -96,7 +96,7 @@ Linux*) ${SUDO} apk add frankenphp echo echo "🥳 FrankenPHP installed to ${italic}/usr/bin/frankenphp${normal} successfully." - echo "❗ The systemd service uses the Caddyfile in ${italic}/etc/frankenphp/Caddyfile${normal}" + echo "❗ The OpenRC service uses the Caddyfile in ${italic}/etc/frankenphp/Caddyfile${normal}" echo "❗ Your php.ini is found in ${italic}/etc/php-zts/php.ini${normal}" echo echo "⭐ If you like FrankenPHP, please give it a star on GitHub: ${italic}https://github.com/php/frankenphp${normal}" From 4dcbd5e732a26af164f21ae5715811fc5f9b5224 Mon Sep 17 00:00:00 2001 From: henderkes Date: Thu, 25 Dec 2025 16:45:07 +0100 Subject: [PATCH 04/23] add alpine package scripts thanks to @alexandre-daubois --- package/alpine/frankenphp.openrc | 28 +++++++++++++++++++++++++++ package/alpine/post-deinstall.sh | 13 +++++++++++++ package/alpine/post-install.sh | 33 ++++++++++++++++++++++++++++++++ package/alpine/pre-deinstall.sh | 11 +++++++++++ 4 files changed, 85 insertions(+) create mode 100644 package/alpine/frankenphp.openrc create mode 100755 package/alpine/post-deinstall.sh create mode 100755 package/alpine/post-install.sh create mode 100755 package/alpine/pre-deinstall.sh diff --git a/package/alpine/frankenphp.openrc b/package/alpine/frankenphp.openrc new file mode 100644 index 000000000..23e5e368c --- /dev/null +++ b/package/alpine/frankenphp.openrc @@ -0,0 +1,28 @@ +#!/sbin/openrc-run + +name="FrankenPHP" +description="Modern PHP app server" + +command="/usr/bin/frankenphp" +command_args="run --environ --config /etc/frankenphp/Caddyfile" +command_user="frankenphp:frankenphp" +command_background="yes" +pidfile="/run/frankenphp/frankenphp.pid" +start_stop_daemon_args="--chdir /var/lib/frankenphp" + +depend() { + need net + after firewall +} + +start_pre() { + checkpath --directory --owner frankenphp:frankenphp --mode 0755 /run/frankenphp + + $command validate --config /etc/frankenphp/Caddyfile +} + +reload() { + ebegin "Reloading $name configuration" + $command reload --config /etc/frankenphp/Caddyfile --force + eend $? +} diff --git a/package/alpine/post-deinstall.sh b/package/alpine/post-deinstall.sh new file mode 100755 index 000000000..fd102fc3f --- /dev/null +++ b/package/alpine/post-deinstall.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +if getent passwd frankenphp >/dev/null; then + deluser frankenphp +fi + +if getent group frankenphp >/dev/null; then + delgroup frankenphp +fi + +rmdir /var/lib/frankenphp 2>/dev/null || true + +exit 0 diff --git a/package/alpine/post-install.sh b/package/alpine/post-install.sh new file mode 100755 index 000000000..d78af85e9 --- /dev/null +++ b/package/alpine/post-install.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +if ! getent group frankenphp >/dev/null; then + addgroup -S frankenphp +fi + +if ! getent passwd frankenphp >/dev/null; then + adduser -S -h /var/lib/frankenphp -s /sbin/nologin -G frankenphp -g "FrankenPHP web server" frankenphp +fi + +chown -R frankenphp:frankenphp /var/lib/frankenphp +chmod 755 /var/lib/frankenphp + +# allow binding to privileged ports +if command -v setcap >/dev/null 2>&1; then + setcap cap_net_bind_service=+ep /usr/bin/frankenphp || true +fi + +# trust FrankenPHP certificates +if [ -x /usr/bin/frankenphp ]; then + HOME=/var/lib/frankenphp /usr/bin/frankenphp run >/dev/null 2>&1 & + FRANKENPHP_PID=$! + sleep 2 + HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || true + kill -TERM $FRANKENPHP_PID 2>/dev/null || true +fi + +if command -v rc-update >/dev/null 2>&1; then + rc-update add frankenphp default + rc-service frankenphp start +fi + +exit 0 diff --git a/package/alpine/pre-deinstall.sh b/package/alpine/pre-deinstall.sh new file mode 100755 index 000000000..59713ea01 --- /dev/null +++ b/package/alpine/pre-deinstall.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +if command -v rc-service >/dev/null 2>&1; then + rc-service frankenphp stop || true +fi + +if command -v rc-update >/dev/null 2>&1; then + rc-update del frankenphp default || true +fi + +exit 0 From 0c0bd6ad146922587524e682c4f8594c4bd82d2d Mon Sep 17 00:00:00 2001 From: henderkes Date: Fri, 2 Jan 2026 10:49:52 +0100 Subject: [PATCH 05/23] only run frankenphp trust on initial install --- package/debian/postinst.sh | 3 ++- package/rhel/postinstall.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package/debian/postinst.sh b/package/debian/postinst.sh index 97c6f2648..184fc4745 100755 --- a/package/debian/postinst.sh +++ b/package/debian/postinst.sh @@ -62,9 +62,10 @@ if command -v setcap >/dev/null 2>&1; then setcap cap_net_bind_service=+ep /usr/bin/frankenphp || true fi -if [ -x /usr/bin/frankenphp ]; then +if [ "$1" = "configure" ] && [ -z "$2" ] && [ -x /usr/bin/frankenphp ]; then HOME=/var/lib/frankenphp /usr/bin/frankenphp run --config /dev/null & FRANKENPHP_PID=$! + sleep 2 HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || true kill "$FRANKENPHP_PID" || true wait "$FRANKENPHP_PID" 2>/dev/null || true diff --git a/package/rhel/postinstall.sh b/package/rhel/postinstall.sh index 5905e2959..c635cdcf1 100755 --- a/package/rhel/postinstall.sh +++ b/package/rhel/postinstall.sh @@ -32,9 +32,10 @@ if command -v setcap >/dev/null 2>&1; then setcap cap_net_bind_service=+ep /usr/bin/frankenphp || : fi -if [ -x /usr/bin/frankenphp ]; then +if [ "$1" -eq 1 ] && [ -x /usr/bin/frankenphp ]; then HOME=/var/lib/frankenphp /usr/bin/frankenphp run --config /dev/null & FRANKENPHP_PID=$! + sleep 2 HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || : kill "$FRANKENPHP_PID" || : wait "$FRANKENPHP_PID" 2>/dev/null || : From ba7b156df1b446141a0447c9447a813a82f3d6a5 Mon Sep 17 00:00:00 2001 From: henderkes Date: Fri, 2 Jan 2026 11:08:33 +0100 Subject: [PATCH 06/23] add completion scripts to debian and rhel bash (alpine doesn't have completion) --- package/debian/postinst.sh | 4 ++++ package/rhel/postinstall.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/package/debian/postinst.sh b/package/debian/postinst.sh index 184fc4745..ab9325180 100755 --- a/package/debian/postinst.sh +++ b/package/debian/postinst.sh @@ -70,3 +70,7 @@ if [ "$1" = "configure" ] && [ -z "$2" ] && [ -x /usr/bin/frankenphp ]; then kill "$FRANKENPHP_PID" || true wait "$FRANKENPHP_PID" 2>/dev/null || true fi + +if [ -x /usr/bin/frankenphp ]; then + /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' > /etc/bash_completion.d/frankenphp +fi diff --git a/package/rhel/postinstall.sh b/package/rhel/postinstall.sh index c635cdcf1..89c58cb08 100755 --- a/package/rhel/postinstall.sh +++ b/package/rhel/postinstall.sh @@ -40,3 +40,7 @@ if [ "$1" -eq 1 ] && [ -x /usr/bin/frankenphp ]; then kill "$FRANKENPHP_PID" || : wait "$FRANKENPHP_PID" 2>/dev/null || : fi + +if [ -x /usr/bin/frankenphp ]; then + /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' > /etc/bash_completion.d/frankenphp +fi From 308394f43d6dd08163b5871973502d1d4574d892 Mon Sep 17 00:00:00 2001 From: henderkes Date: Fri, 2 Jan 2026 14:37:25 +0100 Subject: [PATCH 07/23] linter --- package/debian/postinst.sh | 2 +- package/rhel/postinstall.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/debian/postinst.sh b/package/debian/postinst.sh index ab9325180..17edb1642 100755 --- a/package/debian/postinst.sh +++ b/package/debian/postinst.sh @@ -72,5 +72,5 @@ if [ "$1" = "configure" ] && [ -z "$2" ] && [ -x /usr/bin/frankenphp ]; then fi if [ -x /usr/bin/frankenphp ]; then - /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' > /etc/bash_completion.d/frankenphp + /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' > /etc/bash_completion.d/frankenphp fi diff --git a/package/rhel/postinstall.sh b/package/rhel/postinstall.sh index 89c58cb08..aeb822b67 100755 --- a/package/rhel/postinstall.sh +++ b/package/rhel/postinstall.sh @@ -42,5 +42,5 @@ if [ "$1" -eq 1 ] && [ -x /usr/bin/frankenphp ]; then fi if [ -x /usr/bin/frankenphp ]; then - /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' > /etc/bash_completion.d/frankenphp + /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' > /etc/bash_completion.d/frankenphp fi From 22054314c23570d52d9d02aa7896a23e7fd0ec73 Mon Sep 17 00:00:00 2001 From: henderkes Date: Fri, 2 Jan 2026 20:33:55 +0100 Subject: [PATCH 08/23] linter --- package/debian/postinst.sh | 2 +- package/rhel/postinstall.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/debian/postinst.sh b/package/debian/postinst.sh index 17edb1642..e0714553b 100755 --- a/package/debian/postinst.sh +++ b/package/debian/postinst.sh @@ -72,5 +72,5 @@ if [ "$1" = "configure" ] && [ -z "$2" ] && [ -x /usr/bin/frankenphp ]; then fi if [ -x /usr/bin/frankenphp ]; then - /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' > /etc/bash_completion.d/frankenphp + /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' >/etc/bash_completion.d/frankenphp fi diff --git a/package/rhel/postinstall.sh b/package/rhel/postinstall.sh index aeb822b67..8b011ba66 100755 --- a/package/rhel/postinstall.sh +++ b/package/rhel/postinstall.sh @@ -42,5 +42,5 @@ if [ "$1" -eq 1 ] && [ -x /usr/bin/frankenphp ]; then fi if [ -x /usr/bin/frankenphp ]; then - /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' > /etc/bash_completion.d/frankenphp + /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' >/etc/bash_completion.d/frankenphp fi From 515fa56f32061d104596fa1e55055f116c0fca83 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Sun, 18 Jan 2026 18:46:24 +0100 Subject: [PATCH 09/23] safety check if caddy or something else currently uses port 2019 --- package/alpine/post-install.sh | 17 ++++++++++++----- package/debian/postinst.sh | 19 +++++++++++++------ package/rhel/postinstall.sh | 19 +++++++++++++------ 3 files changed, 38 insertions(+), 17 deletions(-) diff --git a/package/alpine/post-install.sh b/package/alpine/post-install.sh index d78af85e9..c57d0bb48 100755 --- a/package/alpine/post-install.sh +++ b/package/alpine/post-install.sh @@ -16,13 +16,20 @@ if command -v setcap >/dev/null 2>&1; then setcap cap_net_bind_service=+ep /usr/bin/frankenphp || true fi +port_in_use() { + port_hex=$(printf '%04X' $1) + grep -q ":${port_hex} " /proc/net/tcp /proc/net/tcp6 2>/dev/null +} + # trust FrankenPHP certificates if [ -x /usr/bin/frankenphp ]; then - HOME=/var/lib/frankenphp /usr/bin/frankenphp run >/dev/null 2>&1 & - FRANKENPHP_PID=$! - sleep 2 - HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || true - kill -TERM $FRANKENPHP_PID 2>/dev/null || true + if ! port_in_use 2019; then + HOME=/var/lib/frankenphp /usr/bin/frankenphp run >/dev/null 2>&1 & + FRANKENPHP_PID=$! + sleep 2 + HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || true + kill -TERM $FRANKENPHP_PID 2>/dev/null || true + fi fi if command -v rc-update >/dev/null 2>&1; then diff --git a/package/debian/postinst.sh b/package/debian/postinst.sh index e0714553b..b7520d00e 100755 --- a/package/debian/postinst.sh +++ b/package/debian/postinst.sh @@ -62,13 +62,20 @@ if command -v setcap >/dev/null 2>&1; then setcap cap_net_bind_service=+ep /usr/bin/frankenphp || true fi +port_in_use() { + port_hex=$(printf '%04X' $1) + grep -q ":${port_hex} " /proc/net/tcp /proc/net/tcp6 2>/dev/null +} + if [ "$1" = "configure" ] && [ -z "$2" ] && [ -x /usr/bin/frankenphp ]; then - HOME=/var/lib/frankenphp /usr/bin/frankenphp run --config /dev/null & - FRANKENPHP_PID=$! - sleep 2 - HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || true - kill "$FRANKENPHP_PID" || true - wait "$FRANKENPHP_PID" 2>/dev/null || true + if ! port_in_use 2019; then + HOME=/var/lib/frankenphp /usr/bin/frankenphp run --config /dev/null & + FRANKENPHP_PID=$! + sleep 2 + HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || true + kill "$FRANKENPHP_PID" || true + wait "$FRANKENPHP_PID" 2>/dev/null || true + fi fi if [ -x /usr/bin/frankenphp ]; then diff --git a/package/rhel/postinstall.sh b/package/rhel/postinstall.sh index 8b011ba66..53905b6cb 100755 --- a/package/rhel/postinstall.sh +++ b/package/rhel/postinstall.sh @@ -32,13 +32,20 @@ if command -v setcap >/dev/null 2>&1; then setcap cap_net_bind_service=+ep /usr/bin/frankenphp || : fi +port_in_use() { + port_hex=$(printf '%04X' $1) + grep -q ":${port_hex} " /proc/net/tcp /proc/net/tcp6 2>/dev/null +} + if [ "$1" -eq 1 ] && [ -x /usr/bin/frankenphp ]; then - HOME=/var/lib/frankenphp /usr/bin/frankenphp run --config /dev/null & - FRANKENPHP_PID=$! - sleep 2 - HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || : - kill "$FRANKENPHP_PID" || : - wait "$FRANKENPHP_PID" 2>/dev/null || : + if ! port_in_use 2019; then + HOME=/var/lib/frankenphp /usr/bin/frankenphp run --config /dev/null & + FRANKENPHP_PID=$! + sleep 2 + HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || : + kill "$FRANKENPHP_PID" || : + wait "$FRANKENPHP_PID" 2>/dev/null || : + fi fi if [ -x /usr/bin/frankenphp ]; then From 96974fb9f56e7133b2fa182054176687f17fbbc4 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Sun, 18 Jan 2026 19:05:31 +0100 Subject: [PATCH 10/23] check specifically for localhost or 0.0.0.0 - if someone binds on a different address that doesn't conflict with us --- package/alpine/post-install.sh | 7 ++++--- package/debian/postinst.sh | 6 ++++-- package/rhel/postinstall.sh | 6 ++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/package/alpine/post-install.sh b/package/alpine/post-install.sh index c57d0bb48..bec00da8b 100755 --- a/package/alpine/post-install.sh +++ b/package/alpine/post-install.sh @@ -16,12 +16,13 @@ if command -v setcap >/dev/null 2>&1; then setcap cap_net_bind_service=+ep /usr/bin/frankenphp || true fi +# check if 0.0.0.0:2019 or 127.0.0.1:2019 are in use port_in_use() { - port_hex=$(printf '%04X' $1) - grep -q ":${port_hex} " /proc/net/tcp /proc/net/tcp6 2>/dev/null + port_hex=$(printf '%04X' $1); + grep -qE "(00000000|0100007F):${port_hex}" /proc/net/tcp 2>/dev/null; } -# trust FrankenPHP certificates +# trust frankenphp certificates if the admin api can start if [ -x /usr/bin/frankenphp ]; then if ! port_in_use 2019; then HOME=/var/lib/frankenphp /usr/bin/frankenphp run >/dev/null 2>&1 & diff --git a/package/debian/postinst.sh b/package/debian/postinst.sh index b7520d00e..8866fe013 100755 --- a/package/debian/postinst.sh +++ b/package/debian/postinst.sh @@ -62,11 +62,13 @@ if command -v setcap >/dev/null 2>&1; then setcap cap_net_bind_service=+ep /usr/bin/frankenphp || true fi +# check if 0.0.0.0:2019 or 127.0.0.1:2019 are in use port_in_use() { - port_hex=$(printf '%04X' $1) - grep -q ":${port_hex} " /proc/net/tcp /proc/net/tcp6 2>/dev/null + port_hex=$(printf '%04X' $1); + grep -qE "(00000000|0100007F):${port_hex}" /proc/net/tcp 2>/dev/null; } +# trust frankenphp certificates if the admin api can start if [ "$1" = "configure" ] && [ -z "$2" ] && [ -x /usr/bin/frankenphp ]; then if ! port_in_use 2019; then HOME=/var/lib/frankenphp /usr/bin/frankenphp run --config /dev/null & diff --git a/package/rhel/postinstall.sh b/package/rhel/postinstall.sh index 53905b6cb..3ad6e2c6f 100755 --- a/package/rhel/postinstall.sh +++ b/package/rhel/postinstall.sh @@ -32,11 +32,13 @@ if command -v setcap >/dev/null 2>&1; then setcap cap_net_bind_service=+ep /usr/bin/frankenphp || : fi +# check if 0.0.0.0:2019 or 127.0.0.1:2019 are in use port_in_use() { - port_hex=$(printf '%04X' $1) - grep -q ":${port_hex} " /proc/net/tcp /proc/net/tcp6 2>/dev/null + port_hex=$(printf '%04X' $1); + grep -qE "(00000000|0100007F):${port_hex}" /proc/net/tcp 2>/dev/null; } +# trust frankenphp certificates if the admin api can start if [ "$1" -eq 1 ] && [ -x /usr/bin/frankenphp ]; then if ! port_in_use 2019; then HOME=/var/lib/frankenphp /usr/bin/frankenphp run --config /dev/null & From 2a0ce1676135b5f26583bd42c3dee8cc10a2b883 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Sun, 18 Jan 2026 19:07:29 +0100 Subject: [PATCH 11/23] make globbing linter happy --- package/alpine/post-install.sh | 2 +- package/debian/postinst.sh | 2 +- package/rhel/postinstall.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/alpine/post-install.sh b/package/alpine/post-install.sh index bec00da8b..f2a09c8b1 100755 --- a/package/alpine/post-install.sh +++ b/package/alpine/post-install.sh @@ -18,7 +18,7 @@ fi # check if 0.0.0.0:2019 or 127.0.0.1:2019 are in use port_in_use() { - port_hex=$(printf '%04X' $1); + port_hex=$(printf '%04X' "$1"); grep -qE "(00000000|0100007F):${port_hex}" /proc/net/tcp 2>/dev/null; } diff --git a/package/debian/postinst.sh b/package/debian/postinst.sh index 8866fe013..8c63a5184 100755 --- a/package/debian/postinst.sh +++ b/package/debian/postinst.sh @@ -64,7 +64,7 @@ fi # check if 0.0.0.0:2019 or 127.0.0.1:2019 are in use port_in_use() { - port_hex=$(printf '%04X' $1); + port_hex=$(printf '%04X' "$1"); grep -qE "(00000000|0100007F):${port_hex}" /proc/net/tcp 2>/dev/null; } diff --git a/package/rhel/postinstall.sh b/package/rhel/postinstall.sh index 3ad6e2c6f..802cbec58 100755 --- a/package/rhel/postinstall.sh +++ b/package/rhel/postinstall.sh @@ -34,7 +34,7 @@ fi # check if 0.0.0.0:2019 or 127.0.0.1:2019 are in use port_in_use() { - port_hex=$(printf '%04X' $1); + port_hex=$(printf '%04X' "$1"); grep -qE "(00000000|0100007F):${port_hex}" /proc/net/tcp 2>/dev/null; } From cf1bd0c46f71694b9574539942ebb903b1de215d Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Sun, 18 Jan 2026 19:10:57 +0100 Subject: [PATCH 12/23] linter doesn't like semicolons either :/ --- package/alpine/post-install.sh | 4 ++-- package/debian/postinst.sh | 4 ++-- package/rhel/postinstall.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package/alpine/post-install.sh b/package/alpine/post-install.sh index f2a09c8b1..4816f63d2 100755 --- a/package/alpine/post-install.sh +++ b/package/alpine/post-install.sh @@ -18,8 +18,8 @@ fi # check if 0.0.0.0:2019 or 127.0.0.1:2019 are in use port_in_use() { - port_hex=$(printf '%04X' "$1"); - grep -qE "(00000000|0100007F):${port_hex}" /proc/net/tcp 2>/dev/null; + port_hex=$(printf '%04X' "$1") + grep -qE "(00000000|0100007F):${port_hex}" /proc/net/tcp 2>/dev/null } # trust frankenphp certificates if the admin api can start diff --git a/package/debian/postinst.sh b/package/debian/postinst.sh index 8c63a5184..65d175cf5 100755 --- a/package/debian/postinst.sh +++ b/package/debian/postinst.sh @@ -64,8 +64,8 @@ fi # check if 0.0.0.0:2019 or 127.0.0.1:2019 are in use port_in_use() { - port_hex=$(printf '%04X' "$1"); - grep -qE "(00000000|0100007F):${port_hex}" /proc/net/tcp 2>/dev/null; + port_hex=$(printf '%04X' "$1") + grep -qE "(00000000|0100007F):${port_hex}" /proc/net/tcp 2>/dev/null } # trust frankenphp certificates if the admin api can start diff --git a/package/rhel/postinstall.sh b/package/rhel/postinstall.sh index 802cbec58..a6b89347c 100755 --- a/package/rhel/postinstall.sh +++ b/package/rhel/postinstall.sh @@ -34,8 +34,8 @@ fi # check if 0.0.0.0:2019 or 127.0.0.1:2019 are in use port_in_use() { - port_hex=$(printf '%04X' "$1"); - grep -qE "(00000000|0100007F):${port_hex}" /proc/net/tcp 2>/dev/null; + port_hex=$(printf '%04X' "$1") + grep -qE "(00000000|0100007F):${port_hex}" /proc/net/tcp 2>/dev/null } # trust frankenphp certificates if the admin api can start From 0ea54f5460c87f87c5b69428fdfa59931b3af959 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Tue, 20 Jan 2026 18:08:52 +0100 Subject: [PATCH 13/23] trust before starting service --- package/debian/postinst.sh | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/package/debian/postinst.sh b/package/debian/postinst.sh index 65d175cf5..0aba5b88e 100755 --- a/package/debian/postinst.sh +++ b/package/debian/postinst.sh @@ -1,6 +1,16 @@ #!/bin/sh set -e +# trust frankenphp certificates before starting the systemd service +if [ "$1" = "configure" ] && [ -z "$2" ] && [ -x /usr/bin/frankenphp ]; then + HOME=/var/lib/frankenphp /usr/bin/frankenphp run --config /dev/null & + FRANKENPHP_PID=$! + sleep 2 + HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || true + kill "$FRANKENPHP_PID" || true + wait "$FRANKENPHP_PID" 2>/dev/null || true +fi + if [ "$1" = "configure" ]; then # Add user and group if ! getent group frankenphp >/dev/null; then @@ -23,13 +33,13 @@ if [ "$1" = "configure" ]; then # user and group will still exist but with no home dir if [ ! -d /var/lib/frankenphp ]; then mkdir -p /var/lib/frankenphp - chown frankenphp:frankenphp /var/lib/frankenphp + chown -R frankenphp:frankenphp /var/lib/frankenphp fi # Add log directory with correct permissions if [ ! -d /var/log/frankenphp ]; then mkdir -p /var/log/frankenphp - chown frankenphp:frankenphp /var/log/frankenphp + chown -R frankenphp:frankenphp /var/log/frankenphp fi fi @@ -62,24 +72,6 @@ if command -v setcap >/dev/null 2>&1; then setcap cap_net_bind_service=+ep /usr/bin/frankenphp || true fi -# check if 0.0.0.0:2019 or 127.0.0.1:2019 are in use -port_in_use() { - port_hex=$(printf '%04X' "$1") - grep -qE "(00000000|0100007F):${port_hex}" /proc/net/tcp 2>/dev/null -} - -# trust frankenphp certificates if the admin api can start -if [ "$1" = "configure" ] && [ -z "$2" ] && [ -x /usr/bin/frankenphp ]; then - if ! port_in_use 2019; then - HOME=/var/lib/frankenphp /usr/bin/frankenphp run --config /dev/null & - FRANKENPHP_PID=$! - sleep 2 - HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || true - kill "$FRANKENPHP_PID" || true - wait "$FRANKENPHP_PID" 2>/dev/null || true - fi -fi - if [ -x /usr/bin/frankenphp ]; then /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' >/etc/bash_completion.d/frankenphp fi From 4fc731e04d11652df362258876d1a5aa239ee96d Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Wed, 21 Jan 2026 09:26:26 +0100 Subject: [PATCH 14/23] create completion dir if it doesn't exist --- package/debian/postinst.sh | 1 + package/rhel/postinstall.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/package/debian/postinst.sh b/package/debian/postinst.sh index 0aba5b88e..46ff65439 100755 --- a/package/debian/postinst.sh +++ b/package/debian/postinst.sh @@ -73,5 +73,6 @@ if command -v setcap >/dev/null 2>&1; then fi if [ -x /usr/bin/frankenphp ]; then + mkdir -p /etc/bash_completion.d/ /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' >/etc/bash_completion.d/frankenphp fi diff --git a/package/rhel/postinstall.sh b/package/rhel/postinstall.sh index a6b89347c..e54119947 100755 --- a/package/rhel/postinstall.sh +++ b/package/rhel/postinstall.sh @@ -51,5 +51,6 @@ if [ "$1" -eq 1 ] && [ -x /usr/bin/frankenphp ]; then fi if [ -x /usr/bin/frankenphp ]; then + mkdir -p /etc/bash_completion.d/ /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' >/etc/bash_completion.d/frankenphp fi From c20a2f67b12f56772e863a7583e9fb6e6f1ec5a6 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Wed, 21 Jan 2026 12:28:14 +0100 Subject: [PATCH 15/23] explicit working directory --- package/debian/frankenphp.service | 1 + package/debian/postinst.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/package/debian/frankenphp.service b/package/debian/frankenphp.service index ead2f7da6..26448f4a3 100644 --- a/package/debian/frankenphp.service +++ b/package/debian/frankenphp.service @@ -8,6 +8,7 @@ Requires=network-online.target Type=notify User=frankenphp Group=frankenphp +WorkingDirectory=/var/lib/frankenphp ExecStart=/usr/bin/frankenphp run --environ --config /etc/frankenphp/Caddyfile ExecReload=/usr/bin/frankenphp reload --config /etc/frankenphp/Caddyfile --force TimeoutStopSec=5s diff --git a/package/debian/postinst.sh b/package/debian/postinst.sh index 46ff65439..44304180f 100755 --- a/package/debian/postinst.sh +++ b/package/debian/postinst.sh @@ -9,6 +9,8 @@ if [ "$1" = "configure" ] && [ -z "$2" ] && [ -x /usr/bin/frankenphp ]; then HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || true kill "$FRANKENPHP_PID" || true wait "$FRANKENPHP_PID" 2>/dev/null || true + + chown -R frankenphp:frankenphp /var/lib/frankenphp fi if [ "$1" = "configure" ]; then From 2c54949623a81317f0f610ff089432eb65007a33 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Wed, 21 Jan 2026 12:55:47 +0100 Subject: [PATCH 16/23] make openrc service executable --- package/alpine/frankenphp.openrc | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 package/alpine/frankenphp.openrc diff --git a/package/alpine/frankenphp.openrc b/package/alpine/frankenphp.openrc old mode 100644 new mode 100755 From 578bfa28c4933046d83e9d6e16fa99505caadc3f Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Wed, 21 Jan 2026 13:40:42 +0100 Subject: [PATCH 17/23] add cap_net_bind_service capabilties to frankenphp.openrc --- package/alpine/frankenphp.openrc | 1 + package/alpine/post-install.sh | 2 ++ package/rhel/postinstall.sh | 2 ++ 3 files changed, 5 insertions(+) diff --git a/package/alpine/frankenphp.openrc b/package/alpine/frankenphp.openrc index 23e5e368c..70a004800 100755 --- a/package/alpine/frankenphp.openrc +++ b/package/alpine/frankenphp.openrc @@ -7,6 +7,7 @@ command="/usr/bin/frankenphp" command_args="run --environ --config /etc/frankenphp/Caddyfile" command_user="frankenphp:frankenphp" command_background="yes" +capabilities="^cap_net_bind_service" pidfile="/run/frankenphp/frankenphp.pid" start_stop_daemon_args="--chdir /var/lib/frankenphp" diff --git a/package/alpine/post-install.sh b/package/alpine/post-install.sh index 4816f63d2..03bd87920 100755 --- a/package/alpine/post-install.sh +++ b/package/alpine/post-install.sh @@ -30,6 +30,8 @@ if [ -x /usr/bin/frankenphp ]; then sleep 2 HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || true kill -TERM $FRANKENPHP_PID 2>/dev/null || true + + chown -R frankenphp:frankenphp /var/lib/frankenphp fi fi diff --git a/package/rhel/postinstall.sh b/package/rhel/postinstall.sh index e54119947..727d9c1cf 100755 --- a/package/rhel/postinstall.sh +++ b/package/rhel/postinstall.sh @@ -47,6 +47,8 @@ if [ "$1" -eq 1 ] && [ -x /usr/bin/frankenphp ]; then HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || : kill "$FRANKENPHP_PID" || : wait "$FRANKENPHP_PID" 2>/dev/null || : + + chown -R frankenphp:frankenphp /var/lib/frankenphp fi fi From 2f8217efa517c84a62bee52727f7d00d72c0d6e7 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Wed, 21 Jan 2026 13:44:26 +0100 Subject: [PATCH 18/23] make debian and rhel service the same --- package/debian/frankenphp.service | 6 ++++-- package/rhel/frankenphp.service | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/package/debian/frankenphp.service b/package/debian/frankenphp.service index 26448f4a3..748d3adf4 100644 --- a/package/debian/frankenphp.service +++ b/package/debian/frankenphp.service @@ -8,13 +8,15 @@ Requires=network-online.target Type=notify User=frankenphp Group=frankenphp -WorkingDirectory=/var/lib/frankenphp +ExecStartPre=/usr/bin/frankenphp validate --config /etc/frankenphp/Caddyfile ExecStart=/usr/bin/frankenphp run --environ --config /etc/frankenphp/Caddyfile -ExecReload=/usr/bin/frankenphp reload --config /etc/frankenphp/Caddyfile --force +ExecReload=/usr/bin/frankenphp reload --config /etc/frankenphp/Caddyfile +WorkingDirectory=/var/lib/frankenphp TimeoutStopSec=5s LimitNOFILE=1048576 LimitNPROC=512 PrivateTmp=true +ProtectHome=true ProtectSystem=full AmbientCapabilities=CAP_NET_BIND_SERVICE diff --git a/package/rhel/frankenphp.service b/package/rhel/frankenphp.service index 40311d6a8..748d3adf4 100644 --- a/package/rhel/frankenphp.service +++ b/package/rhel/frankenphp.service @@ -1,6 +1,8 @@ [Unit] -Description=FrankenPHP server -After=network.target +Description=FrankenPHP +Documentation=https://frankenphp.dev/docs/ +After=network.target network-online.target +Requires=network-online.target [Service] Type=notify From 011a9c7bd7570dff1b67e2c93476b729f009cef5 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Wed, 21 Jan 2026 13:46:29 +0100 Subject: [PATCH 19/23] better description --- package/debian/frankenphp.service | 2 +- package/rhel/frankenphp.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/debian/frankenphp.service b/package/debian/frankenphp.service index 748d3adf4..4349f5f0f 100644 --- a/package/debian/frankenphp.service +++ b/package/debian/frankenphp.service @@ -1,5 +1,5 @@ [Unit] -Description=FrankenPHP +Description=FrankenPHP - The Modern PHP App Server Documentation=https://frankenphp.dev/docs/ After=network.target network-online.target Requires=network-online.target diff --git a/package/rhel/frankenphp.service b/package/rhel/frankenphp.service index 748d3adf4..4349f5f0f 100644 --- a/package/rhel/frankenphp.service +++ b/package/rhel/frankenphp.service @@ -1,5 +1,5 @@ [Unit] -Description=FrankenPHP +Description=FrankenPHP - The Modern PHP App Server Documentation=https://frankenphp.dev/docs/ After=network.target network-online.target Requires=network-online.target From e31dfa2abce75a5b5d387975bdcb14290db8faa4 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Wed, 21 Jan 2026 13:55:24 +0100 Subject: [PATCH 20/23] same description for all --- package/alpine/frankenphp.openrc | 2 +- package/debian/frankenphp.service | 2 +- package/rhel/frankenphp.service | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/alpine/frankenphp.openrc b/package/alpine/frankenphp.openrc index 70a004800..aeca1743c 100755 --- a/package/alpine/frankenphp.openrc +++ b/package/alpine/frankenphp.openrc @@ -1,7 +1,7 @@ #!/sbin/openrc-run name="FrankenPHP" -description="Modern PHP app server" +description="The modern PHP app server" command="/usr/bin/frankenphp" command_args="run --environ --config /etc/frankenphp/Caddyfile" diff --git a/package/debian/frankenphp.service b/package/debian/frankenphp.service index 4349f5f0f..0b2dfe4a0 100644 --- a/package/debian/frankenphp.service +++ b/package/debian/frankenphp.service @@ -1,5 +1,5 @@ [Unit] -Description=FrankenPHP - The Modern PHP App Server +Description=FrankenPHP - The modern PHP app server Documentation=https://frankenphp.dev/docs/ After=network.target network-online.target Requires=network-online.target diff --git a/package/rhel/frankenphp.service b/package/rhel/frankenphp.service index 4349f5f0f..0b2dfe4a0 100644 --- a/package/rhel/frankenphp.service +++ b/package/rhel/frankenphp.service @@ -1,5 +1,5 @@ [Unit] -Description=FrankenPHP - The Modern PHP App Server +Description=FrankenPHP - The modern PHP app server Documentation=https://frankenphp.dev/docs/ After=network.target network-online.target Requires=network-online.target From a5c597737275b7a165b5f4a7125afe542aa83189 Mon Sep 17 00:00:00 2001 From: Marc Date: Thu, 22 Jan 2026 09:23:17 +0100 Subject: [PATCH 21/23] different bash completion dir --- package/debian/postinst.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/package/debian/postinst.sh b/package/debian/postinst.sh index 44304180f..178a4df04 100755 --- a/package/debian/postinst.sh +++ b/package/debian/postinst.sh @@ -1,18 +1,6 @@ #!/bin/sh set -e -# trust frankenphp certificates before starting the systemd service -if [ "$1" = "configure" ] && [ -z "$2" ] && [ -x /usr/bin/frankenphp ]; then - HOME=/var/lib/frankenphp /usr/bin/frankenphp run --config /dev/null & - FRANKENPHP_PID=$! - sleep 2 - HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || true - kill "$FRANKENPHP_PID" || true - wait "$FRANKENPHP_PID" 2>/dev/null || true - - chown -R frankenphp:frankenphp /var/lib/frankenphp -fi - if [ "$1" = "configure" ]; then # Add user and group if ! getent group frankenphp >/dev/null; then @@ -31,6 +19,18 @@ if [ "$1" = "configure" ]; then usermod -aG www-data frankenphp fi + # trust frankenphp certificates before starting the systemd service + if [ -z "$2" ] && [ -x /usr/bin/frankenphp ]; then + HOME=/var/lib/frankenphp /usr/bin/frankenphp run --config /dev/null & + FRANKENPHP_PID=$! + sleep 2 + HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || true + kill "$FRANKENPHP_PID" || true + wait "$FRANKENPHP_PID" 2>/dev/null || true + + chown -R frankenphp:frankenphp /var/lib/frankenphp + fi + # Handle cases where package was installed and then purged; # user and group will still exist but with no home dir if [ ! -d /var/lib/frankenphp ]; then @@ -75,6 +75,6 @@ if command -v setcap >/dev/null 2>&1; then fi if [ -x /usr/bin/frankenphp ]; then - mkdir -p /etc/bash_completion.d/ - /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' >/etc/bash_completion.d/frankenphp + mkdir -p /usr/share/bash-completion/completions/ + /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' >/usr/share/bash-completion/completions/frankenphp fi From d7dabeec242bf9d7ff093843d5411292e29b2802 Mon Sep 17 00:00:00 2001 From: Marc Date: Thu, 22 Jan 2026 09:24:29 +0100 Subject: [PATCH 22/23] different bash completion dir on rhel too --- package/rhel/postinstall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/rhel/postinstall.sh b/package/rhel/postinstall.sh index 727d9c1cf..c3c311af4 100755 --- a/package/rhel/postinstall.sh +++ b/package/rhel/postinstall.sh @@ -53,6 +53,6 @@ if [ "$1" -eq 1 ] && [ -x /usr/bin/frankenphp ]; then fi if [ -x /usr/bin/frankenphp ]; then - mkdir -p /etc/bash_completion.d/ - /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' >/etc/bash_completion.d/frankenphp + mkdir -p /usr/share/bash-completion/completions/ + /usr/bin/frankenphp completion bash | sed 's/caddy/frankenphp/g' >/usr/share/bash-completion/completions/frankenphp fi From 730bd457d66e4335b7ce9631aa1f7e1001ec215d Mon Sep 17 00:00:00 2001 From: Marc Date: Thu, 22 Jan 2026 09:31:05 +0100 Subject: [PATCH 23/23] make linter happy --- package/debian/postinst.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/debian/postinst.sh b/package/debian/postinst.sh index 178a4df04..2d6e4d993 100755 --- a/package/debian/postinst.sh +++ b/package/debian/postinst.sh @@ -27,7 +27,7 @@ if [ "$1" = "configure" ]; then HOME=/var/lib/frankenphp /usr/bin/frankenphp trust || true kill "$FRANKENPHP_PID" || true wait "$FRANKENPHP_PID" 2>/dev/null || true - + chown -R frankenphp:frankenphp /var/lib/frankenphp fi