Skip to content

Commit 06beebb

Browse files
author
Jeff Bezos
committed
fix package builder
1 parent 9cf8d66 commit 06beebb

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@ other Linux distros):
113113
* libseccomp-dev
114114
* libpcap-dev
115115

116+
Packaging
117+
---------
118+
119+
To package a stenographer as deb/rpm/apk use the included nfpm config template:
120+
121+
$ nfpm pkg --packager deb --target /tmp/
122+
$ nfpm pkg --packager rpm --target /tmp/
123+
116124

117125
Obligatory Fine Print
118126
---------------------

nfpm.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# nfpm configuration for stenographer
2-
# https://github.com/qxip/stenographer
1+
# nfpm example config file
2+
#
3+
# check https://nfpm.goreleaser.com/configuration for detailed usage
34
#
45
name: "stenographer"
56
arch: "amd64"
@@ -13,6 +14,7 @@ provides:
1314
- stenographer
1415
recommends:
1516
- tcpdump
17+
- jq
1618
suggests:
1719
- tshark
1820
maintainer: "QXIP BV <[email protected]>"
@@ -57,7 +59,8 @@ overrides:
5759
scripts:
5860
# preinstall: ./scripts/preinstall.sh
5961
postinstall: ./scripts/postinstall.sh
62+
# postremove: ./scripts/postremove.sh
6063
deb:
6164
scripts:
62-
# preinstall: ./scripts/preinstall.sh
6365
postinstall: ./scripts/postinstall.sh
66+
# preremove: ./scripts/preremove.sh

scripts/postinstall.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ _scriptDir="/opt/stenographer"
44

55
add_accounts () {
66
if ! id stenographer &>/dev/null; then
7-
Info "Setting up stenographer user"
7+
echo "Setting up stenographer user"
88
sudo adduser --system --no-create-home stenographer
99
fi
1010
if ! getent group stenographer &>/dev/null; then
11-
Info "Setting up stenographer group"
11+
echo "Setting up stenographer group"
1212
sudo addgroup --system stenographer
1313
fi
1414
}
@@ -19,7 +19,7 @@ install_certs () {
1919
install_configs () {
2020
cd $_scriptDir
2121

22-
Info "Setting up stenographer conf directory"
22+
echo "Setting up stenographer conf directory"
2323
if [ ! -d /etc/stenographer/certs ]; then
2424
sudo mkdir -p /etc/stenographer/certs
2525
sudo chown -R root:root /etc/stenographer/certs
@@ -32,7 +32,7 @@ install_configs () {
3232
sudo chown root:root /etc/stenographer
3333

3434
if grep -q /path/to /etc/stenographer/config; then
35-
echo "Create output directories and update settings in /etc/stenographer/config"
35+
echo "WARNING! Create output directories and update settings in /etc/stenographer/config"
3636
fi
3737
}
3838

@@ -53,12 +53,12 @@ install_service () {
5353
cd $_scriptDir
5454

5555
if [ ! -f /etc/security/limits.d/stenographer.conf ]; then
56-
Info "Setting up stenographer limits"
56+
echo "Setting up stenographer limits"
5757
sudo cp -v configs/limits.conf /etc/security/limits.d/stenographer.conf
5858
fi
5959

6060
if [ ! -f /etc/systemd/system/stenographer.service ]; then
61-
Info "Installing stenographer systemd service"
61+
echo "Installing stenographer systemd service"
6262
sudo cp -v configs/systemd.conf /etc/systemd/system/stenographer.service
6363
sudo chmod 0644 /etc/systemd/system/stenographer.service
6464
fi

0 commit comments

Comments
 (0)