Couple of debian fixes, cannot use variable expansions this way
This commit is contained in:
@@ -32,11 +32,11 @@ sudo systemctl start bird-exporter
|
||||
|
||||
Default configuration:
|
||||
```
|
||||
BIRD_RUN_USER=bird
|
||||
BIRD_RUN_GROUP=bird
|
||||
BIRD_EXPORTER_ARGS="-period=60s -bird.socket=/var/run/bird/bird.ctl"
|
||||
BIRD_EXPORTER_ARGS="-web.listen-address=:9324 -period=60s -bird.socket=/var/run/bird/bird.ctl"
|
||||
```
|
||||
|
||||
The service runs as the `bird` user and group.
|
||||
|
||||
## Documentation
|
||||
|
||||
- **Manual page**: `man bird-exporter` (after package installation)
|
||||
|
||||
7
debian/bird-exporter.default
vendored
7
debian/bird-exporter.default
vendored
@@ -1,8 +1,3 @@
|
||||
# Default settings for bird-exporter
|
||||
|
||||
# User and group to run bird-exporter as
|
||||
BIRD_RUN_USER=bird
|
||||
BIRD_RUN_GROUP=bird
|
||||
|
||||
# Command line arguments to pass to bird-exporter
|
||||
BIRD_EXPORTER_ARGS="-period=60s -bird.socket=/var/run/bird/bird.ctl"
|
||||
BIRD_EXPORTER_ARGS="-web.listen-address=:9324 -period=60s -bird.socket=/var/run/bird/bird.ctl"
|
||||
|
||||
18
debian/bird-exporter.postinst
vendored
Executable file
18
debian/bird-exporter.postinst
vendored
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
# Create bird user if it doesn't exist
|
||||
if ! getent passwd bird > /dev/null; then
|
||||
adduser --system --group --no-create-home \
|
||||
--home /nonexistent \
|
||||
--gecos "BIRD routing daemon" \
|
||||
bird
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
4
debian/bird-exporter.service
vendored
4
debian/bird-exporter.service
vendored
@@ -6,9 +6,9 @@ Wants=bird.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=bird
|
||||
Group=bird
|
||||
EnvironmentFile=-/etc/default/bird-exporter
|
||||
User=${BIRD_RUN_USER:-bird}
|
||||
Group=${BIRD_RUN_GROUP:-bird}
|
||||
ExecStart=/usr/bin/bird-exporter $BIRD_EXPORTER_ARGS
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
1
debian/rules
vendored
1
debian/rules
vendored
@@ -14,7 +14,6 @@ override_dh_auto_build:
|
||||
|
||||
override_dh_auto_install:
|
||||
install -D -m 0755 bird-exporter debian/bird-exporter/usr/bin/bird-exporter
|
||||
install -D -m 0644 debian/bird-exporter.service debian/bird-exporter/lib/systemd/system/bird-exporter.service
|
||||
install -D -m 0644 debian/bird-exporter.default debian/bird-exporter/etc/default/bird-exporter
|
||||
install -D -m 0644 docs/bird-exporter.1 debian/bird-exporter/usr/share/man/man1/bird-exporter.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user