1 |
michel |
1.1 |
diff -urN e-smith-tinydns-2.6.0.old/createlinks e-smith-tinydns-2.6.0/createlinks |
2 |
|
|
--- e-smith-tinydns-2.6.0.old/createlinks 2006-03-15 02:01:42.000000000 +0400 |
3 |
|
|
+++ e-smith-tinydns-2.6.0/createlinks 2020-11-15 21:03:51.669079903 +0400 |
4 |
|
|
@@ -4,23 +4,27 @@ |
5 |
|
|
use strict; |
6 |
|
|
use esmith::Build::CreateLinks qw(:all); |
7 |
|
|
|
8 |
|
|
-#-------------------------------------------------- |
9 |
|
|
-# actions for bootstrap-console-save event: |
10 |
|
|
-#-------------------------------------------------- |
11 |
|
|
-my $event = "bootstrap-console-save"; |
12 |
|
|
- |
13 |
|
|
+#------------------------------------------------------------------- |
14 |
|
|
+# actions for bootstrap-console-save event, e-smith-tinydns-update : |
15 |
|
|
+#------------------------------------------------------------------- |
16 |
|
|
foreach (qw( |
17 |
|
|
env/IP |
18 |
|
|
env/DATALIMIT |
19 |
|
|
root/data |
20 |
|
|
)) |
21 |
|
|
{ |
22 |
|
|
- templates2events("/var/service/tinydns/$_", $event); |
23 |
|
|
+ templates2events("/var/service/tinydns/$_", qw( |
24 |
|
|
+ bootstrap-console-save |
25 |
|
|
+ e-smith-tinydns-update |
26 |
|
|
+ )); |
27 |
|
|
} |
28 |
|
|
|
29 |
|
|
-$event = "ip-change"; |
30 |
|
|
+my $event = "ip-change"; |
31 |
|
|
safe_symlink("sigusr2", "root/etc/e-smith/events/$event/services2adjust/tinydns"); |
32 |
|
|
|
33 |
|
|
+$event = "e-smith-tinydns-update"; |
34 |
|
|
+safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/tinydns"); |
35 |
|
|
+ |
36 |
|
|
safe_symlink("daemontools", "root/etc/rc.d/init.d/tinydns"); |
37 |
|
|
service_link_enhanced("tinydns", "S55", "7"); |
38 |
|
|
service_link_enhanced("tinydns", "K65", "6"); |
39 |
|
|
diff -urN e-smith-tinydns-2.6.0.old/root/usr/lib/systemd/system/tinydns.service e-smith-tinydns-2.6.0/root/usr/lib/systemd/system/tinydns.service |
40 |
|
|
--- e-smith-tinydns-2.6.0.old/root/usr/lib/systemd/system/tinydns.service 1970-01-01 04:00:00.000000000 +0400 |
41 |
|
|
+++ e-smith-tinydns-2.6.0/root/usr/lib/systemd/system/tinydns.service 2020-11-15 20:34:41.237876728 +0400 |
42 |
|
|
@@ -0,0 +1,14 @@ |
43 |
|
|
+[Unit] |
44 |
|
|
+Description=tinydns, |
45 |
|
|
+After=network.target |
46 |
|
|
+ |
47 |
|
|
+[Service] |
48 |
|
|
+Type=oneshot |
49 |
|
|
+ExecStartPre=/sbin/e-smith/service-status tinydns |
50 |
|
|
+ExecStart=/usr/bin/sv u /service/tinydns |
51 |
|
|
+ExecStop=/usr/bin/sv stop /service/tinydns |
52 |
|
|
+ExecReload=/usr/bin/sv t /service/tinydns |
53 |
|
|
+RemainAfterExit=yes |
54 |
|
|
+ |
55 |
|
|
+[Install] |
56 |
|
|
+WantedBy=sme-server.target |