create and use custom user on debian install

This commit is contained in:
Jakob Ketterl 2020-02-17 15:03:20 +01:00
parent ad565c5a2b
commit 521755b9f2
3 changed files with 8 additions and 4 deletions

2
debian/control vendored
View File

@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 10), dh-python, python3 (>= 3.5), dh-systemd (>= 1.
Package: openwebrx Package: openwebrx
Architecture: all Architecture: all
Depends: python3 (>= 3.5), python3-pkg-resources, csdr (>= 0.14), netcat, owrx-connector (>= 0.1), ${python3:Depends} Depends: adduser, python3 (>= 3.5), python3-pkg-resources, csdr (>= 0.14), netcat, owrx-connector (>= 0.1), ${python3:Depends}
Recommends: digiham (>= 0.3), dsd (>= 1.7), sox, direwolf (>= 1.4), wsjtx Recommends: digiham (>= 0.3), dsd (>= 1.7), sox, direwolf (>= 1.4), wsjtx
Description: multi-user web sdr Description: multi-user web sdr
Open source, multi-user SDR receiver with a web interface Open source, multi-user SDR receiver with a web interface

4
debian/postinst vendored Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
set -euxo pipefail
adduser --system --group --no-create-home --home /nonexistant openwebrx

View File

@ -4,10 +4,10 @@ After=multi-user.target
[Service] [Service]
Type=simple Type=simple
User=root User=openwebrx
Group=root Group=openwebrx
ExecStart=/usr/bin/openwebrx ExecStart=/usr/bin/openwebrx
Restart=on-failure Restart=always
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target