Skip to content

systemd.listen placeholder#7342

Open
MayCXC wants to merge 3 commits intocaddyserver:masterfrom
MayCXC:systemd-placeholders
Open

systemd.listen placeholder#7342
MayCXC wants to merge 3 commits intocaddyserver:masterfrom
MayCXC:systemd-placeholders

Conversation

@MayCXC
Copy link
Contributor

@MayCXC MayCXC commented Nov 6, 2025

Assistance Disclosure

No AI was used.

Implements #7331 as a placeholder, bind sd/name/3 -> bind fd/{systemd.listen.name:3}. A custom network was only beneficial to implement support with a plugin, the actual behavior needed was just a fancy {env.*} that substitutes the index of a value from an array in the environment. Using one avoids complicating the config syntax and parsing, and sets us up for more systemd placeholders like {systemd.creds.*}.

@MayCXC MayCXC changed the title systemd placeholders systemd.listen placeholder Nov 12, 2025
@@ -0,0 +1,8 @@
//go:build !linux || nosystemd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this file and remove the nosystemd build tag & filename, we don't need to exclude global placeholders. Either the user has systemd and uses the placeholders, or they don't have systemd and don't use the placeholders. It's fine. Keep it simple.

Copy link
Contributor Author

@MayCXC MayCXC Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the convention in master we would have replacer_other.go here with the same contents. nosystemd is more precise than other is for !linux. we can rename notify_other.go to notify_nosystemd.go to make them match after.

@@ -0,0 +1,376 @@
//go:build linux && !nosystemd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename the file to replacer_test_linux.go

Suggested change
//go:build linux && !nosystemd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants