[Git][debian-proftpd-team/proftpd][master] 5 commits: Added a prerm script to stop not enabled systemd service/socket at remove time.

Francesco Paolo Lovergine (@frankie) frankie at debian.org
Thu Jun 22 09:18:35 BST 2023



Francesco Paolo Lovergine pushed to branch master at Debian ProFTPD Team / proftpd


Commits:
081a436d by Francesco Paolo Lovergine at 2023-06-22T09:05:56+02:00
Added a prerm script to stop not enabled systemd service/socket at remove time.

- - - - -
050ddda1 by Francesco Paolo Lovergine at 2023-06-22T09:10:33+02:00
Revised the prerm script to take actions only under specific conditions, by mimic the DH strategy in stopping service/socket.

- - - - -
b5b2a47f by Francesco Paolo Lovergine at 2023-06-22T09:14:07+02:00
Ready for a new upload in sid.

- - - - -
4166772b by Francesco Paolo Lovergine at 2023-06-22T10:12:04+02:00
Updated README.Debian

- - - - -
929e2f69 by Francesco Paolo Lovergine at 2023-06-22T10:13:19+02:00
Fixed a typo in NEWS file.

- - - - -


4 changed files:

- debian/changelog
- debian/proftpd-core.NEWS
- debian/proftpd-core.README.Debian
- + debian/proftpd-core.prerm


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+proftpd-dfsg (1.3.8+dfsg-6) unstable; urgency=medium
+
+  * Added a postrm to force stop of systemd units at remove time. This is due
+    because the new way of installing service/socket now does not trigger stopping 
+    at remove time. 
+  * Updated the README.Debian file to reflect changes in service management.
+
+ -- Francesco Paolo Lovergine <frankie at debian.org>  Thu, 22 Jun 2023 08:26:48 +0200
+
 proftpd-dfsg (1.3.8+dfsg-5) unstable; urgency=medium
 
   [ Hilmar Preusse ]


=====================================
debian/proftpd-core.NEWS
=====================================
@@ -2,7 +2,7 @@ proftpd-dfsg (1.3.8+dfsg-5) unstable; urgency=medium
 
     Starting from this version a new systemd unit file 'proftpd-run.service' has
     been introduced to allow switching between standalone and systemd (socket) mode.
-    In order to switch mode, it possible to change ServerType from standalone to inetd
+    In order to switch mode, it is possible to change ServerType from standalone to inetd
     in /etc/proftpd/proftpd.conf and run
         systemctl stop proftpd.service
         systemctl start proftpd.socket


=====================================
debian/proftpd-core.README.Debian
=====================================
@@ -104,8 +104,8 @@ superservers (inetd/xinetd) or systemd socket to run proftpd instances.
 
 That could be done by running 
 
-	service proftpd stop
-	systemctl disable proftpd.service
+	systemctl stop proftpd.service
+	systemctl disable proftpd-run.service (only for xinetd/inetd use)
 
 then changing from 'standalone' to 'inetd' the ServerType entry in
 /etc/proftpd/proftpd.conf, and: 
@@ -132,10 +132,10 @@ then changing from 'standalone' to 'inetd' the ServerType entry in
   - or using systemd support for socket. To do that run:
 
 	systemctl stop proftpd.service
-	systemctl disable proftpd.service
-	systemctl enable proftpd.socket
 	systemctl start proftpd.socket
 
+    The proftpd-run.service will take care of the mode switching at boot time.
+
 ** Other information
 
 Please, read accurately the NEWS, README and changelog file in /usr/share/doc/proftpd-basic


=====================================
debian/proftpd-core.prerm
=====================================
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -d /run/systemd/system ] ;
+then
+    deb-systemd-invoke stop 'proftpd.service' >/dev/null || true
+    deb-systemd-invoke stop 'proftpd.socket' >/dev/null || true
+fi
+
+#DEBHELPER#



View it on GitLab: https://salsa.debian.org/debian-proftpd-team/proftpd/-/compare/0a1cd5312ed06be9e3f4ecec506930e6e73a1b19...929e2f69ef86c1ca7214a54a133f371aa4d332a3

-- 
View it on GitLab: https://salsa.debian.org/debian-proftpd-team/proftpd/-/compare/0a1cd5312ed06be9e3f4ecec506930e6e73a1b19...929e2f69ef86c1ca7214a54a133f371aa4d332a3
You're receiving this email because of your account on salsa.debian.org.




More information about the Pkg-proftpd-maintainers mailing list