File: needrestart

package info (click to toggle)
l2tpns 2.4.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,892 kB
  • sloc: ansic: 22,125; sh: 177; perl: 139; makefile: 132
file content (38 lines) | stat: -rw-r--r-- 1,184 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
commit 943717e48d3b4ef7d5abb16554991d8f115f3870
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Fri Jan 5 14:11:38 2024 +0100

    Add needrestart file
    
    To let administrator when to drop all sessions

diff --git a/Makefile b/Makefile
index cc0f561..c47b083 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
 DESTDIR =
 bindir = /usr/sbin
 etcdir = /etc/l2tpns
+needrestartdir = /etc/needrestart/conf.d
 libdir = /usr/lib/l2tpns
 man5dir = /usr/share/man/man5
 man8dir = /usr/share/man/man8
@@ -80,6 +81,9 @@ install: all
 	$(INSTALL) -m 0644 docs/manpages/l2tpns.8 $(DESTDIR)$(man8dir)/l2tpns.8
 	$(INSTALL) -m 0644 docs/manpages/nsctl.8 $(DESTDIR)$(man8dir)/nsctl.8
 
+	$(INSTALL) -d $(DESTDIR)$(needrestartdir)
+	$(INSTALL) -m 0644 needrestart.conf $(DESTDIR)$(needrestartdir)/l2tpns.conf
+
 	gzip --best --force $(DESTDIR)$(man5dir)/*.5 $(DESTDIR)$(man8dir)/*.8
 
 	@for config in startup-config users ip_pool; \
diff --git a/needrestart.conf b/needrestart.conf
new file mode 100644
index 0000000..2d3f0c3
--- /dev/null
+++ b/needrestart.conf
@@ -0,0 +1,2 @@
+# Let administrator choose when to drop all sessions
+$nrconf{override_rc}->{qr(^l2tpns)} = 0;