Skip to content

Commit

Permalink
Changes from the review
Browse files Browse the repository at this point in the history
  • Loading branch information
narc-Ontakac2 committed Feb 29, 2024
1 parent 314c95b commit 8e28a5c
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 14 deletions.
9 changes: 5 additions & 4 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ Source: vzlogger
Section: net
Priority: optional
Maintainer: Joachim Zobel <[email protected]>
Build-Depends: debhelper (>= 12), pkg-config (>= 0.25),
libjson-c-dev (>= 0.9), libcurl4-openssl-dev (>= 7.19),
Build-Depends: debhelper (>= 12), pkgconf,
libjson-c-dev, libcurl4-openssl-dev,
libmicrohttpd-dev (>= 0.4.6), libsml-dev (>= 1.0), cmake, libsasl2-dev,
libssl-dev, libgcrypt-dev, libgnutls28-dev, uuid-dev, libunistring-dev,
libgmock-dev, libgtest-dev, pandoc, libmosquitto-dev
Standards-Version: 4.6.1
Standards-Version: 4.6.2
Rules-Requires-Root: no
Homepage: http://wiki.volkszaehler.org/software/controller/vzlogger
Vcs-Git: https://github.com/volkszaehler/vzlogger.git
Vcs-Browser: https://github.com/volkszaehler/vzlogger

Package: vzlogger
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, libsml1
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
Pre-Depends: ${misc:Pre-Depends}
Description: program for logging measurements to a volkszaehler.org middleware
vzlogger...
Expand Down
4 changes: 4 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ override_dh_auto_configure:
dh_auto_configure -- -DBUILD_TEST=off
endif

override_dh_installsystemd:
# stop the service during install, see man dh_installsystemd
dh_installsystemd --no-restart-after-upgrade

ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test: ;
endif
Expand Down
4 changes: 2 additions & 2 deletions debian/vzlogger.init
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ DAEMON=/usr/bin/vzlogger
DAEMON_ARGS="-d" # Arguments to run the daemon with
#PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
USER=vzlogger
GROUP=vzlogger
USER=_vzlogger
GROUP=_vzlogger

# Exit if the package is not installed
[ -x $DAEMON ] || exit 0
Expand Down
13 changes: 9 additions & 4 deletions debian/vzlogger.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ set -e

case "$1" in
configure)
if ! id vzlogger > /dev/null 2>&1 ; then
if id vzlogger > /dev/null 2>&1 ; then
# maintain compatibility with existing native installations
usermod -l _vzlogger vzlogger
groupmod --new-name _vzlogger vzlogger
fi
if ! id _vzlogger > /dev/null 2>&1 ; then
adduser --quiet --system --no-create-home --home /nonexistent \
--group --disabled-password --shell /bin/false \
vzlogger
usermod -a -G dialout vzlogger
_vzlogger
usermod -a -G dialout _vzlogger
fi

touch /var/log/vzlogger.log
chown vzlogger:adm /var/log/vzlogger.log
chown _vzlogger:adm /var/log/vzlogger.log
;;

abort-upgrade|abort-remove|abort-deconfigure)
Expand Down
2 changes: 0 additions & 2 deletions debian/vzlogger.postrm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ set -e
case "$1" in
purge)
rm -f /var/log/vzlogger.log*
deluser --quiet --system vzlogger
delgroup --quiet --system vzlogger
;;

remove|abort-install|abort-upgrade|disappear)
Expand Down
4 changes: 2 additions & 2 deletions debian/vzlogger.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ After=network.target ntp.service

[Service]
ExecStart=/usr/bin/vzlogger -c /etc/vzlogger.conf
User=vzlogger
Group=vzlogger
User=_vzlogger
Group=_vzlogger
ExecReload=
StandardOutput=null

Expand Down

0 comments on commit 8e28a5c

Please sign in to comment.