Compare commits

..

106 commits

Author SHA1 Message Date
f
7c99447606
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/push/woodpecker/3 Pipeline was successful
ci/woodpecker/push/woodpecker/4 Pipeline was successful
2024-10-23 10:41:31 -03:00
f
0e8b6ac71a
fix: move docker password to plugin config
https://github.com/woodpecker-ci/woodpecker/issues/4140#issuecomment-2369019247
2024-10-23 10:35:32 -03:00
f
acaf232d62
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
Some checks failed
ci/woodpecker/push/woodpecker/2 Pipeline is pending
ci/woodpecker/push/woodpecker/3 Pipeline is pending
ci/woodpecker/push/woodpecker/4 Pipeline is pending
ci/woodpecker/push/woodpecker/1 Pipeline failed
2024-09-14 17:27:36 -03:00
f
fc1a12e592
fix: upgrade alpines 2024-09-14 17:25:35 -03:00
f
0dab2e2f21
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/push/woodpecker/3 Pipeline was successful
ci/woodpecker/push/woodpecker/4 Pipeline was successful
2024-07-23 10:21:14 -03:00
f
000ac53f39
feat: upgrades
https://alpinelinux.org/posts/Alpine-3.17.9-3.18.8-3.19.3-released.html

https://alpinelinux.org/posts/Alpine-3.20.2-released.html
2024-07-23 10:18:44 -03:00
f
441dc86068
fix: AS [skip ci] 2024-06-21 12:29:45 -03:00
f
6ce591abc0
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2024-06-21 12:29:28 -03:00
f
41354bbc95
fix: deprecate MAINTAINER 2024-06-21 12:21:51 -03:00
f
7f7cac3324
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/push/woodpecker/3 Pipeline was successful
ci/woodpecker/push/woodpecker/4 Pipeline was successful
2024-06-19 10:17:46 -03:00
f
c0e6b8150b
refactor: use matrix so it's easier to merge downstream containers 2024-06-19 10:15:44 -03:00
f
f7da597784
feat: upgrade 2024-06-19 10:14:59 -03:00
f
07394ea227
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/push/woodpecker/3 Pipeline was successful
ci/woodpecker/push/woodpecker/4 Pipeline was successful
2024-05-22 11:00:20 -03:00
f
b99a8111d8
feat: 3.20 released 2024-05-22 10:20:38 -03:00
f
aa086a76af
BREAKING CHANGE: deprecate 3.16 2024-05-22 10:20:27 -03:00
f
01303721ce
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/push/woodpecker/3 Pipeline was successful
2024-02-13 13:24:56 -03:00
f
2a72840be0
fix: 3.15 eol 2024-02-13 13:22:59 -03:00
f
397dff920a
fix: upgrade alpine 2024-02-13 13:22:45 -03:00
f
e66b364db7
ci: pipeline is deprecated 2023-12-12 13:36:48 -03:00
f
b8b98ef2e0
ci: build
All checks were successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/push/woodpecker/3 Pipeline was successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
2023-12-12 10:03:59 -03:00
f
ac0b189bb5
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2023-12-07 10:34:23 -03:00
f
b921379aa0
feat: alpine 3.19 2023-12-07 10:22:26 -03:00
f
c2d6e5bc81
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
Some checks failed
ci/woodpecker/push/woodpecker/1 Pipeline failed
ci/woodpecker/push/woodpecker/2 Pipeline failed
2023-12-04 11:07:32 -03:00
f
8dd7d4605a
fix: bad commit 2023-12-04 11:06:47 -03:00
f
d11e588f03
feat: alpine upgrades 2023-12-04 11:03:14 -03:00
f
fd9bdb2eef
ci: rebuild
All checks were successful
ci/woodpecker/manual/woodpecker/1 Pipeline was successful
ci/woodpecker/manual/woodpecker/2 Pipeline was successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
2023-11-23 18:30:30 -03:00
f
04b0f20647
fix: discover default interface
sometimes docker would change the container interface
2023-11-23 09:54:20 -03:00
f
7d84f1ad9a
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-09-28 12:32:54 -03:00
f
5085c7e8df
feat: alpine 3.18.4 2023-09-28 12:24:44 -03:00
f
1233c89aff fix: use proper namespaces 2023-08-24 11:50:53 -03:00
f
9b66b4cbc7 BREAKING CHANGE: change base container
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-08-22 15:43:53 -03:00
f
19868b56cb Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-08-08 11:29:12 -03:00
f
3dde92d4de BREAKING CHANGE: deprecate alpine 3.14 2023-08-08 11:18:21 -03:00
f
3e098e8c24 fix: upgrade alpines 2023-08-08 11:18:00 -03:00
f
bdf4d61db2 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-06-15 12:38:08 -03:00
f
582b83d3fa fix: 3.18.2 2023-06-15 12:37:11 -03:00
f
84b848b911 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-06-14 13:12:08 -03:00
f
5d35cad642 feat: upgrade alpine
https://alpinelinux.org/posts/Alpine-3.15.9-3.16.6-3.17.4-3.18.2-released.html
2023-06-14 13:10:38 -03:00
f
d8ef27a7d6 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-05-10 12:41:55 -03:00
f
fedf64f2b9 feat: alpine 3.18 2023-05-10 12:41:25 -03:00
f
3af76ddeec fix: use new ipv4 subnet
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-04-19 14:36:16 -03:00
f
8cdc7138fe feat: configurable smtp 2023-04-19 14:35:47 -03:00
f
1eae4208e8 feat: provide external configuration 2023-04-19 14:34:19 -03:00
f
a28eb9596d [skip ci] Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2023-04-04 18:13:42 -03:00
f
24c31e7eb8 fix: base registry 2023-04-04 18:03:51 -03:00
f
da19bd76f8 BREAKING CHANGE: use public gitea registry 2023-04-04 17:22:42 -03:00
f
6f246db003 fix: when thing don't work according to docs
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-04-04 16:57:39 -03:00
f
c7eafaed22 fix: use woodpecker plugin
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2023-04-04 16:53:13 -03:00
f
4246b0ba57 BREAKING CHANGE: use public registry
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2023-04-04 16:47:37 -03:00
f
baf76a7c9b Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-03-29 16:33:14 -03:00
f
1068b67884 feat: alpine upgrades 2023-03-29 16:32:41 -03:00
f
434501ef54 feat: alpine upgrade 2023-02-11 12:39:02 -03:00
f
e735a775e9 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-01-14 16:10:30 -03:00
f
dcf07f90e7 refactor: use strings 2023-01-14 16:09:32 -03:00
f
4aa380ee62 feat: alpine 3.17.1 2023-01-14 16:08:15 -03:00
f
764999f0ff Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-11-23 11:07:48 -03:00
f
c4d0c8ac35 feat: 3.17 upgrade 2022-11-23 10:58:48 -03:00
f
b0dadddbb0 fix: 3.16.3 bug release 2022-11-23 10:58:28 -03:00
f
c1e94bd27f fix: deprecate 3.13 2022-11-23 10:56:44 -03:00
f
9329c68860 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-08-09 11:04:42 -03:00
f
0b354f4fea releases fixing zlib cve 2022-08-09 10:36:07 -03:00
f
f031a78685 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-monit into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-07-19 18:50:14 -03:00
f
65b97b7dfd Merge branch 'syslogize' into antifascista 2022-07-19 18:50:05 -03:00
f
9ad0295f11 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2022-07-19 18:50:03 -03:00
f
3034258f36 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into syslogize
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-07-19 18:49:33 -03:00
f
9c4de359fb alpine upgrades 2022-07-19 18:48:03 -03:00
e2894c0aae Merge pull request 'syslogize' (#1) from syslogize into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #1
2022-06-05 20:14:47 -03:00
f
75df2530e3 tag with the program name by default
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-06-04 17:40:00 -03:00
f
af44e95be9 propagate signals
send signals received by syslogize to the wrapped program.  this way we
can treat syslogize as we treated the program itself.
2022-06-04 17:38:44 -03:00
f
94583cdcca add to container
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-06-04 16:53:38 -03:00
f
9f2673b4e1 daemonize requires the full path 2022-06-04 16:53:04 -03:00
f
e38f6a1fe6 syslogize
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
a wrapper for sending output to syslog when the program doesn't support
it.  if adds syslogging support to daemonize as well.
2022-06-04 16:48:38 -03:00
f
5d2ad04336 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-05-29 21:05:42 -03:00
f
c90ba65374 alpine 3.16 2022-05-29 21:05:05 -03:00
f
3f78ebd148 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-04-04 16:09:16 -03:00
f
4ac1583bcb CVE-2022-28391
https://security.alpinelinux.org/vuln/CVE-2022-28391
2022-04-04 16:08:10 -03:00
f
e41a77ee7b cache prevents build if the version doesn't exist
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-03-29 10:15:29 -03:00
f
bbfa212002 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2022-03-28 19:07:55 -03:00
f
deaa49652f alpine releases
https://alpinelinux.org/posts/Alpine-3.12.11-3.13.9-3.14.5-3.15.3-released.html
2022-03-28 19:06:57 -03:00
f
b198d36200 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-03-19 14:50:27 -03:00
f
e565c1380a woodpecker-cli lint 2022-03-19 14:48:54 -03:00
f
45562a4354 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2022-03-19 14:48:23 -03:00
f
1b72fdc8b0 credentials for mmmonit 2022-03-19 14:47:05 -03:00
f
65304feb56 alpine upgrade 2022-03-19 14:46:16 -03:00
f
03513b78ec less data
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-03-15 18:05:28 -03:00
f
8b674a10b9 we'll skip this version
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-03-14 18:34:42 -03:00
f
d4294d219a register to mmmonit with credentials 2022-03-14 18:34:00 -03:00
f
a615fdf509 default env
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-03-14 11:10:22 -03:00
f
c0531c8f3c bug introduced by b04c169a8e 2022-03-14 11:09:55 -03:00
f
4387534944 mmonit support
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-03-13 23:27:39 -03:00
f
a299ab663f newer versions first 2022-03-08 09:43:09 -03:00
f
b04c169a8e autoconfigure email
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-03-07 22:05:10 -03:00
f
7aa9fe6d10 fixes
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2022-03-07 19:59:50 -03:00
f
d27b839b0d verify config
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2022-03-07 19:55:25 -03:00
f
755c3c75d6 configurable email
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-03-07 18:59:28 -03:00
f
9a9ee411da alpine versions 2022-03-03 22:59:09 -03:00
f
0c9ca5f55b don't cleanup after build
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
should allow woodpecker to reutilize the cache
2022-03-02 15:53:19 -03:00
f
ed9e013135 knot is always at knot.doma.in
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-03-01 18:34:11 -03:00
f
8c2c4aa4d8 cache and keep 3.13.6
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2022-02-15 15:06:19 -03:00
f
e5856e8865 remove previous records
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2022-01-20 17:17:18 -03:00
f
e546682b45 alpine upgrade
Some checks failed
continuous-integration/woodpecker the build failed
2021-11-24 20:36:39 -03:00
f
ba8955e7aa ensure there's an alert email
Some checks failed
continuous-integration/woodpecker the build failed
2021-10-09 13:45:05 -03:00
f
95b521eead container name
Some checks failed
continuous-integration/woodpecker the build failed
2021-10-04 13:27:59 -03:00
f
b0de70d3ef base image is alpine
Some checks failed
continuous-integration/woodpecker the build failed
2021-10-04 13:24:49 -03:00
f
d338528819 ensure utf-8 locale
Some checks failed
continuous-integration/woodpecker the build failed
2021-10-04 13:20:24 -03:00
f
eaeb0cd8b2 [skip ci] remove gitlab ci 2021-10-03 20:44:39 -03:00
10 changed files with 116 additions and 53 deletions

View file

@ -1,11 +0,0 @@
stages:
- build
build:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --destination $CI_REGISTRY_IMAGE:latest

View file

@ -1,22 +1,25 @@
pipeline: steps:
publish: publish:
image: plugins/docker image: "docker.io/woodpeckerci/plugin-docker-buildx"
registry: registry.nulo.in settings:
repo: registry.nulo.in/sutty/CHANGEME registry: "https://gitea.nulo.in"
tags: username: "sutty"
- ${ALPINE_VERSION} repo: "gitea.nulo.in/sutty/monit"
- latest tags:
build_args: - "${ALPINE_VERSION}"
- ALPINE_VERSION=${ALPINE_VERSION} - "latest"
- BASE_IMAGE=registry.nulo.in/sutty/monit build_args:
username: sutty - "ALPINE_VERSION=${ALPINE_VERSION}"
secrets: - "BASE_IMAGE=gitea.nulo.in/sutty/sutty"
- docker_password purge: false
password:
from_secret: "DOCKER_PASSWORD"
when: when:
branch: antifascista branch: "antifascista"
event: push event: "push"
matrix: matrix:
ALPINE_VERSION: include:
- 3.13.6 - ALPINE_VERSION: "3.20.3"
- 3.14.2 - ALPINE_VERSION: "3.19.4"
- ALPINE_VERSION: "3.18.9"
- ALPINE_VERSION: "3.17.10"

View file

@ -1,34 +1,33 @@
ARG ALPINE_VERSION=3.13.6 ARG ALPINE_VERSION=3.18.3
ARG BASE_IMAGE=alpine ARG BASE_IMAGE=gitea.nulo.in/sutty/sutty
ARG EMAIL=monit@sutty.nl FROM ${BASE_IMAGE}:${ALPINE_VERSION} AS build
FROM ${BASE_IMAGE}:${ALPINE_VERSION} as build
RUN apk add --no-cache tzdata
COPY ./monitrc /etc/monitrc COPY ./monitrc /etc/monitrc
RUN chmod 600 /etc/monitrc RUN chmod 600 /etc/monitrc
RUN sed -re "s/@@EMAIL@@/${EMAIL}/" -i /etc/monitrc
FROM ${BASE_IMAGE}:${ALPINE_VERSION} FROM ${BASE_IMAGE}:${ALPINE_VERSION}
ARG ALPINE_VERSION LABEL org.opencontainers.image.authors="f@sutty.nl"
MAINTAINER "f <f@sutty.nl>" ENV EMAIL=monit@sutty.nl
ENV EMAIL_FROM=monit@sutty.nl
# Sutty's repository ENV MMONIT=mmmonit.athshe.sutty.nl
RUN echo ${ALPINE_VERSION} | cut -d . -f 1,2 | xargs -I {} echo https://alpine.sutty.nl/alpine/v{}/sutty | tee -a /etc/apk/repositories ENV CREDENTIALS=mmmonit:mmmonit.athshe.sutty.nl
RUN wget https://alpine.sutty.nl/alpine/sutty.pub -O /etc/apk/keys/alpine@sutty.nl-5ea884cd.rsa.pub
# Install monit and remove default config # Install monit and remove default config
RUN apk add --no-cache tini monit knsupdate RUN apk add --no-cache tini monit knsupdate
COPY --from=build /usr/share/zoneinfo/UTC /etc/localtime
# Create directories # Create directories
RUN install -dm 2750 -o root -g root /etc/monit.d RUN install -dm 2750 -o root -g root /etc/monit.d
RUN install -dm 2750 -o root -g root /etc/monit.d/external/
RUN install -dm 2750 -o root -g root /var/lib/monit RUN install -dm 2750 -o root -g root /var/lib/monit
# Install config # Install config
COPY --from=build /etc/monitrc /etc/monitrc COPY --from=build /etc/monitrc /etc/monitrc
COPY ./nsupdate.sh /usr/local/bin/nsupdate COPY ./nsupdate.sh /usr/local/bin/nsupdate
COPY ./whatsmyip6.sh /usr/local/bin/whatsmyip6 COPY ./whatsmyip6.sh /usr/local/bin/whatsmyip6
COPY ./whatsmydefaulteth.sh /usr/local/bin/whatsmydefaulteth
COPY ./syslogize.sh /usr/local/bin/syslogize
COPY ./zeroconf.sh /usr/local/bin/zeroconf
COPY ./zeroconf.conf /etc/zeroconf.conf
# Allow access to the web GUI # Allow access to the web GUI
EXPOSE 2812 EXPOSE 2812

12
monitrc
View file

@ -5,17 +5,17 @@ set pidfile /run/monit.pid
set idfile /var/lib/monit/id set idfile /var/lib/monit/id
set statefile /var/lib/monit/state set statefile /var/lib/monit/state
set eventqueue basedir /var/lib/monit/events slots 100 set eventqueue basedir /var/lib/monit/events slots 100
set mailserver postfix
set limits { programoutput: 1 MB } set limits { programoutput: 1 MB }
set alert @@EMAIL@@
set httpd port 2812
allow localhost
allow 172.0.0.0/8
check program nsupdate check program nsupdate
with path "/usr/local/bin/nsupdate" with path "/usr/local/bin/nsupdate"
every 1 cycle every 1 cycle
if status = 0 then unmonitor if status = 0 then unmonitor
check program zeroconf
with path "/usr/local/bin/zeroconf"
every 1 cycle
if status = 0 then unmonitor
include /etc/monit.d/*.conf include /etc/monit.d/*.conf
include /etc/monit.d/external/*.conf

View file

@ -3,10 +3,9 @@
# Registers the local IPv6 address to the DNS # Registers the local IPv6 address to the DNS
IP6="`whatsmyip6`" IP6="`whatsmyip6`"
KNOT="${KNOT:-${IP6}}" KNOT="${KNOT:-knot.${DOMAIN}}"
test -z "${IP6}" && exit 1 test -z "${IP6}" && exit 1
test -z "${KNOT}" && exit 1
test -z "${DOMAIN}" && exit 1 test -z "${DOMAIN}" && exit 1
# Add a dot if the hostname contains the domain # Add a dot if the hostname contains the domain
@ -17,6 +16,7 @@ server ${KNOT}
zone ${DOMAIN}. zone ${DOMAIN}.
origin ${DOMAIN}. origin ${DOMAIN}.
ttl 60 ttl 60
del ${HOSTNAME}${DOT} AAAA
add ${HOSTNAME}${DOT} AAAA ${IP6} add ${HOSTNAME}${DOT} AAAA ${IP6}
send send
quit quit

33
syslogize.sh Executable file
View file

@ -0,0 +1,33 @@
#!/bin/sh
# A wrapper for programs that can't write to syslog. Output and error
# are sent to syslog.
#
# Use LOGGER environment variable to pass options to `logger`. They'll
# probably be system-dependent, so handle with care.
#
# Usage:
#
# LOGGER="-t program" syslogize program -o -p --tions argu ments
#
# daemonize /usr/local/bin/syslogize program
if test $# -eq 0 ; then
grep "^#" $0 | grep -v /bin/sh | sed -re "s/^#\s*//" >&2
exit 1
fi
LOGGER="${LOGGER:--t $1}"
propagate_signal () {
logger ${LOGGER} "Received $1 signal"
jobs -p | xargs kill -$1
}
for signal in HUP INT QUIT USR1 USR2 TERM; do
trap "propagate_signal ${signal}" ${signal}
done
$@ 2>&1 | logger ${LOGGER} &
wait $!

3
whatsmydefaulteth.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
ip -6 r | grep default | tr -s " " | cut -d " " -f 5

View file

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
ip address show ${1:-eth0} | grep inet6 | grep global | tr -s " " | cut -d " " -f 3 | cut -d / -f 1 ip address show ${1:-$(whatsmydefaulteth)} | grep inet6 | grep global | tr -s " " | cut -d " " -f 3 | cut -d / -f 1

16
zeroconf.conf Normal file
View file

@ -0,0 +1,16 @@
set mmonit http://@@MMONIT@@/collector
set mailserver @@POSTFIX@@ port 25 using hostname @@HOSTNAME@@
set alert @@EMAIL@@
set mail-format {
from: Monit <@@EMAIL_FROM@@>
subject: $HOST
message: $ACTION $SERVICE -- $DATE: $DESCRIPTION.
}
set httpd port 2812
allow localhost
allow 10.13.12.0/24
allow "fd00:acab::/32"
allow @@CREDENTIALS@@

20
zeroconf.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/sh
set -e
test ! -f /etc/monit.d/zeroconf.conf || exit 0
test -n "${EMAIL}"
test -n "${EMAIL_FROM}"
test -n "${MMONIT}"
test -n "${CREDENTIALS}"
sed -re "s/@@EMAIL@@/${EMAIL}/" \
-e "s/@@EMAIL_FROM@@/${EMAIL_FROM}/" \
-e "s/@@HOSTNAME@@/${EMAIL_FROM#*@}/" \
-e "s/@@MMONIT@@/${MMONIT}/" \
-e "s/@@CREDENTIALS@@/${CREDENTIALS}/" \
-e "s/@@POSTFIX@@/${POSTFIX:-postfix}/" \
/etc/zeroconf.conf > /etc/monit.d/zeroconf.conf
monit -t
monit reload