-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to debian 12 and add postfix_exporter
- Loading branch information
Showing
8 changed files
with
113 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
mkdir /var/log/s6-maillog | ||
chown postfix:postfix /var/log/s6-maillog | ||
|
||
exec s6-setuidgid postfix s6-log -bp 1 n3 s10000000 /var/log/s6-maillog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [[ "${POSTFIX_EXPORTER_ENABLED}" == "true" ]]; then | ||
# Shutdown everything and exit the process crashes or is stopped. | ||
s6-svscanctl -t /etc/s6 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
[ "$DEBUG" == 'true' ] && set -x | ||
|
||
# Defaults | ||
: "${LOGOUTPUT:=/dev/stdout}" | ||
|
||
if [[ "${POSTFIX_EXPORTER_ENABLED}" == "true" ]] && [[ "${LOGOUTPUT}" != "/dev/stdout" ]]; then | ||
echo "postfix_exporter >> FATAL exporter is enabled but requires LOGOUTPUT is set to /dev/stdout" | ||
s6-svscanctl -t /etc/s6 | ||
exit 1 | ||
elif [[ "${POSTFIX_EXPORTER_ENABLED}" == "true" ]]; then | ||
s6-svwait -u /etc/s6/postfix/log | ||
echo "postfix_exporter >> Starting postfix_exporter" | ||
exec s6-setuidgid postfix postfix_exporter --postfix.logfile_path=/var/log/s6-maillog/current | ||
fi | ||
|
||
echo "postfix_exporter >> POSTFIX_EXPORTER_ENABLED not \"true\", not starting postfix_exporter" | ||
|
||
s6-svc -d "$(pwd)" | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters