work by @ptudor on the Debian scripts

pull/117/head
bert hubert 2020-04-28 22:31:28 +02:00
parent ecc0188151
commit cea8f539a0
3 changed files with 6 additions and 3 deletions

2
debian/control vendored
View File

@ -2,7 +2,7 @@ Source: galmon
Section: net
Priority: optional
Maintainer: Patrick Tudor <debian@ptudor.net>
Build-Depends: debhelper (>=11~)
Build-Depends: debhelper (>=11~), help2man, libzstd-dev, adduser
Standards-Version: 4.3.0
Homepage: https://github.com/ahupowerdns/galmon/

View File

@ -6,6 +6,7 @@ StartLimitIntervalSec=0
ConditionPathExists=/etc/default/galmon
[Service]
Environment=DEBIAN_FRONTEND=noninteractive
Type=simple
Restart=no
ExecStartPre=+apt-get update

View File

@ -17,7 +17,9 @@ if getent passwd ubxtool > /dev/null ; then
echo "galmon: ubxtool user exists, skipping"
else
echo "galmon: creating ubxtool system user"
adduser --system ubxtool && adduser ubxtool ubxtool
adduser --system ubxtool --no-create-home --home /run/ubxtool
echo "galmon: adding ubxtool user to ubxtool group"
adduser ubxtool ubxtool
echo "galmon: adding ubxtool user to dialout group"
adduser ubxtool dialout
fi
@ -41,7 +43,7 @@ print_help_text() {
echo "Example: cp /etc/default/galmon /etc/default/ubxtool-ttyACM0"
echo "Example: vi /etc/default/ubxtool-ttyACM0"
echo "Example: systemctl enable --now ubxtool@ttyACM0"
echo "Example: systemctl enable --now galmon-upgrade.timer"
echo "Example: (beta testing) systemctl enable --now galmon-upgrade.timer"
}
setup_user