summaryrefslogtreecommitdiffstats
path: root/templates/man7/daemon.7.pot
blob: 214d77f9138ab34a9c794e54601261a815405595 (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-06-01 05:46+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: TH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "DAEMON"
msgstr ""

#. type: TH
#: archlinux fedora-40 mageia-cauldron opensuse-tumbleweed
#, no-wrap
msgid "systemd 255"
msgstr ""

#. type: TH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "daemon"
msgstr ""

#.  -----------------------------------------------------------------
#.  * MAIN CONTENT STARTS HERE *
#.  -----------------------------------------------------------------
#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "NAME"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "daemon - Writing and packaging system daemons"
msgstr ""

#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "DESCRIPTION"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"A daemon is a service process that runs in the background and supervises the "
"system or provides functionality to other processes\\&. Traditionally, "
"daemons are implemented following a scheme originating in SysV Unix\\&. "
"Modern daemons should follow a simpler yet more powerful scheme (here called "
"\"new-style\" daemons), as implemented by B<systemd>(1)\\&. This manual page "
"covers both schemes, and in particular includes recommendations for daemons "
"that shall be included in the systemd init system\\&."
msgstr ""

#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "SysV Daemons"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"When a traditional SysV daemon starts, it should execute the following steps "
"as part of the initialization\\&. Note that these steps are unnecessary for "
"new-style daemons (see below), and should only be implemented if "
"compatibility with SysV is essential\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Close all open file descriptors except standard input, output, and error "
"(i\\&.e\\&. the first three file descriptors 0, 1, 2)\\&. This ensures that "
"no accidentally passed file descriptor stays around in the daemon "
"process\\&. On Linux, this is best implemented by iterating through /proc/"
"self/fd, with a fallback of iterating from file descriptor 3 to the value "
"returned by B<getrlimit()> for B<RLIMIT_NOFILE>\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Reset all signal handlers to their default\\&. This is best done by "
"iterating through the available signals up to the limit of B<_NSIG> and "
"resetting them to B<SIG_DFL>\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "Reset the signal mask using B<sigprocmask()>\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Sanitize the environment block, removing or resetting environment variables "
"that might negatively impact daemon runtime\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "Call B<fork()>, to create a background process\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"In the child, call B<setsid()> to detach from any terminal and create an "
"independent session\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-rawhide mageia-cauldron opensuse-tumbleweed
msgid ""
"In the child, call B<fork()> again, to ensure that the daemon can never re-"
"acquire a terminal again\\&. (This is relevant if the program \\(em and all "
"its dependencies \\(em does not carefully specify `O_NOCTTY` on each and "
"every single `open()` call that might potentially open a TTY device node\\&.)"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Call B<exit()> in the first child, so that only the second child (the actual "
"daemon process) stays around\\&. This ensures that the daemon process is re-"
"parented to init/PID 1, as all daemons should be\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"In the daemon process, connect /dev/null to standard input, output, and "
"error\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"In the daemon process, reset the umask to 0, so that the file modes passed "
"to B<open()>, B<mkdir()> and suchlike directly control the access mode of "
"the created files and directories\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"In the daemon process, change the current directory to the root directory "
"(/), in order to avoid that the daemon involuntarily blocks mount points "
"from being unmounted\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"In the daemon process, write the daemon PID (as returned by B<getpid()>) to "
"a PID file, for example /run/foobar\\&.pid (for a hypothetical daemon "
"\"foobar\") to ensure that the daemon cannot be started more than once\\&. "
"This must be implemented in race-free fashion so that the PID file is only "
"updated when it is verified at the same time that the PID previously stored "
"in the PID file no longer exists or belongs to a foreign process\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "In the daemon process, drop privileges, if possible and applicable\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"From the daemon process, notify the original process started that "
"initialization is complete\\&. This can be implemented via an unnamed pipe "
"or similar communication channel that is created before the first B<fork()> "
"and hence available in both the original and the daemon process\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Call B<exit()> in the original process\\&. The process that invoked the "
"daemon must be able to rely on that this B<exit()> happens after "
"initialization is complete and all external communication channels are "
"established and accessible\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The BSD B<daemon()> function should not be used, as it implements only a "
"subset of these steps\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"A daemon that needs to provide compatibility with SysV systems should "
"implement the scheme pointed out above\\&. However, it is recommended to "
"make this behavior optional and configurable via a command line argument to "
"ease debugging as well as to simplify integration into systems using "
"systemd\\&."
msgstr ""

#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "New-Style Daemons"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Modern services for Linux should be implemented as new-style daemons\\&. "
"This makes it easier to supervise and control them at runtime and simplifies "
"their implementation\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
msgid ""
"For developing a new-style daemon, none of the initialization steps "
"recommended for SysV daemons need to be implemented\\&. New-style init "
"systems such as systemd make all of them redundant\\&. Moreover, since some "
"of these steps interfere with process monitoring, file descriptor passing, "
"and other functionality of the service manager, it is recommended not to "
"execute them when run as new-style service\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Note that new-style init systems guarantee execution of daemon processes in "
"a clean process context: it is guaranteed that the environment block is "
"sanitized, that the signal handlers and mask is reset and that no left-over "
"file descriptors are passed\\&. Daemons will be executed in their own "
"session, with standard input connected to /dev/null and standard output/"
"error connected to the B<systemd-journald.service>(8)  logging service, "
"unless otherwise configured\\&. The umask is reset\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "It is recommended for new-style daemons to implement the following:"
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
msgid ""
"If applicable, the daemon should notify the service manager about startup "
"completion or status updates via the B<sd_notify>(3)  interface, in "
"particular I<READY=1> and I<STATUS=\\&...>\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
msgid ""
"If B<SIGTERM> is received, shut down the daemon and exit cleanly\\&. A "
"I<STOPPING=1> notification should be sent via B<sd_notify>(3)\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
msgid ""
"If B<SIGHUP> is received, reload the configuration files, if this "
"applies\\&. This should be combined with notifications via B<sd_notify>(3): "
"I<RELOADING=1> and I<READY=1>\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
msgid ""
"Provide a correct exit code from the main daemon process, as this is used by "
"the service manager to detect service errors and problems\\&. It is "
"recommended to follow the exit code scheme as defined in the \\m[blue]B<LSB "
"recommendations for SysV init scripts>\\m[]\\&\\s-2\\u[1]\\d\\s+2\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If possible and applicable, expose the daemon\\*(Aqs control interface via "
"the D-Bus IPC system and grab a bus name as last step of initialization\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"For integration in systemd, provide a \\&.service unit file that carries "
"information about starting, stopping and otherwise maintaining the "
"daemon\\&. See B<systemd.service>(5)  for details\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
msgid ""
"As much as possible, rely on the service manager\\*(Aqs functionality to "
"limit the access of the daemon to files, services, and other resources, i\\&."
"e\\&. in the case of systemd, rely on systemd\\*(Aqs resource limit control "
"instead of implementing your own, rely on systemd\\*(Aqs privilege dropping "
"code instead of implementing it in the daemon, and so on\\&. See B<systemd."
"exec>(5)  for the available controls\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If D-Bus is used, make your daemon bus-activatable by supplying a D-Bus "
"service activation configuration file\\&. This has multiple advantages: your "
"daemon may be started lazily on-demand; it may be started in parallel to "
"other daemons requiring it \\(em which maximizes parallelization and boot-up "
"speed; your daemon can be restarted on failure without losing any bus "
"requests, as the bus queues requests for activatable services\\&. See below "
"for details\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If your daemon provides services to other local processes or remote clients "
"via a socket, it should be made socket-activatable following the scheme "
"pointed out below\\&. Like D-Bus activation, this enables on-demand starting "
"of services as well as it allows improved parallelization of service start-"
"up\\&. Also, for state-less protocols (such as syslog, DNS), a daemon "
"implementing socket-based activation can be restarted without losing a "
"single request\\&. See below for details\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-rawhide mageia-cauldron opensuse-tumbleweed
msgid ""
"If the service opens sockets or other files on it own, and those file "
"descriptors shall survive a restart, the daemon should store them in the "
"service manager via B<sd_notify>(3)  with I<FDSTORE=1>\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
msgid ""
"Instead of using the B<syslog()> call to log directly to the system syslog "
"service, a new-style daemon may choose to simply log to standard error via "
"B<fprintf()>, which is then forwarded to syslog\\&. If log levels are "
"necessary, these can be encoded by prefixing individual log lines with "
"strings like \"E<lt>4E<gt>\" (for log level 4 \"WARNING\" in the syslog "
"priority scheme), following a similar style as the Linux kernel\\*(Aqs "
"B<printk()> level system\\&. For details, see B<sd-daemon>(3)  and B<systemd."
"exec>(5)\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
msgid ""
"As new-style daemons are invoked without a controlling TTY (but as their own "
"session leaders) care should be taken to always specify B<O_NOCTTY> on "
"B<open>(2)  calls that possibly reference a TTY device node, so that no "
"controlling TTY is accidentally acquired\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"These recommendations are similar but not identical to the \\m[blue]B<Apple "
"MacOS X Daemon Requirements>\\m[]\\&\\s-2\\u[2]\\d\\s+2\\&."
msgstr ""

#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "ACTIVATION"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"New-style init systems provide multiple additional mechanisms to activate "
"services, as detailed below\\&. It is common that services are configured to "
"be activated via more than one mechanism at the same time\\&. An example for "
"systemd: bluetoothd\\&.service might get activated either when Bluetooth "
"hardware is plugged in, or when an application accesses its programming "
"interfaces via D-Bus\\&. Or, a print server daemon might get activated when "
"traffic arrives at an IPP port, or when a printer is plugged in, or when a "
"file is queued in the printer spool directory\\&. Even for services that are "
"intended to be started on system bootup unconditionally, it is a good idea "
"to implement some of the various activation schemes outlined below, in order "
"to maximize parallelization\\&. If a daemon implements a D-Bus service or "
"listening socket, implementing the full bus and socket activation scheme "
"allows starting of the daemon with its clients in parallel (which speeds up "
"boot-up), since all its communication channels are established already, and "
"no request is lost because client requests will be queued by the bus system "
"(in case of D-Bus) or the kernel (in case of sockets) until the activation "
"is completed\\&."
msgstr ""

#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "Activation on Boot"
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
msgid ""
"Old-style daemons are usually activated exclusively on boot (and manually by "
"the administrator) via SysV init scripts, as detailed in the \\m[blue]B<LSB "
"Linux Standard Base Core Specification>\\m[]\\&\\s-2\\u[1]\\d\\s+2\\&. This "
"method of activation is supported ubiquitously on Linux init systems, both "
"old-style and new-style systems\\&. Among other issues, SysV init scripts "
"have the disadvantage of involving shell scripts in the boot process\\&. New-"
"style init systems generally use updated versions of activation, both during "
"boot-up and during runtime and using more minimal service description "
"files\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"In systemd, if the developer or administrator wants to make sure that a "
"service or other unit is activated automatically on boot, it is recommended "
"to place a symlink to the unit file in the \\&.wants/ directory of either "
"multi-user\\&.target or graphical\\&.target, which are normally used as boot "
"targets at system startup\\&. See B<systemd.unit>(5)  for details about the "
"\\&.wants/ directories, and B<systemd.special>(7)  for details about the two "
"boot targets\\&."
msgstr ""

#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "Socket-Based Activation"
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
msgid ""
"In order to maximize the possible parallelization and robustness and "
"simplify configuration and development, it is recommended for all new-style "
"daemons that communicate via listening sockets to use socket-based "
"activation\\&. In a socket-based activation scheme, the creation and binding "
"of the listening socket as primary communication channel of daemons to local "
"(and sometimes remote) clients is moved out of the daemon code and into the "
"service manager\\&. Based on per-daemon configuration, the service manager "
"installs the sockets and then hands them off to the spawned process as soon "
"as the respective daemon is to be started\\&. Optionally, activation of the "
"service can be delayed until the first inbound traffic arrives at the socket "
"to implement on-demand activation of daemons\\&. However, the primary "
"advantage of this scheme is that all providers and all consumers of the "
"sockets can be started in parallel as soon as all sockets are "
"established\\&. In addition to that, daemons can be restarted with losing "
"only a minimal number of client transactions, or even any client request at "
"all (the latter is particularly true for state-less protocols, such as DNS "
"or syslog), because the socket stays bound and accessible during the "
"restart, and all requests are queued while the daemon cannot process them\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
msgid ""
"New-style daemons which support socket activation must be able to receive "
"their sockets from the service manager instead of creating and binding them "
"themselves\\&. For details about the programming interfaces for this scheme "
"provided by systemd, see B<sd_listen_fds>(3)  and B<sd-daemon>(3)\\&. For "
"details about porting existing daemons to socket-based activation, see "
"below\\&. With minimal effort, it is possible to implement socket-based "
"activation in addition to traditional internal socket creation in the same "
"codebase in order to support both new-style and old-style init systems from "
"the same daemon binary\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"systemd implements socket-based activation via \\&.socket units, which are "
"described in B<systemd.socket>(5)\\&. When configuring socket units for "
"socket-based activation, it is essential that all listening sockets are "
"pulled in by the special target unit sockets\\&.target\\&. It is recommended "
"to place a I<WantedBy=sockets\\&.target> directive in the [Install] section "
"to automatically add such a dependency on installation of a socket unit\\&. "
"Unless I<DefaultDependencies=no> is set, the necessary ordering dependencies "
"are implicitly created for all socket units\\&. For more information about "
"sockets\\&.target, see B<systemd.special>(7)\\&. It is not necessary or "
"recommended to place any additional dependencies on socket units (for "
"example from multi-user\\&.target or suchlike) when one is installed in "
"sockets\\&.target\\&."
msgstr ""

#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "Bus-Based Activation"
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
msgid ""
"When the D-Bus IPC system is used for communication with clients, new-style "
"daemons should use bus activation so that they are automatically activated "
"when a client application accesses their IPC interfaces\\&. This is "
"configured in D-Bus service files (not to be confused with systemd service "
"unit files!)\\&. To ensure that D-Bus uses systemd to start-up and maintain "
"the daemon, use the I<SystemdService=> directive in these service files to "
"configure the matching systemd service for a D-Bus service\\&. e\\&.g\\&.: "
"For a D-Bus service whose D-Bus activation file is named org\\&."
"freedesktop\\&.RealtimeKit\\&.service, make sure to set "
"I<SystemdService=rtkit-daemon\\&.service> in that file to bind it to the "
"systemd service rtkit-daemon\\&.service\\&. This is needed to make sure that "
"the daemon is started in a race-free fashion when activated via multiple "
"mechanisms simultaneously\\&."
msgstr ""

#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "Device-Based Activation"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Often, daemons that manage a particular type of hardware should be activated "
"only when the hardware of the respective kind is plugged in or otherwise "
"becomes available\\&. In a new-style init system, it is possible to bind "
"activation to hardware plug/unplug events\\&. In systemd, kernel devices "
"appearing in the sysfs/udev device tree can be exposed as units if they are "
"tagged with the string \"systemd\"\\&. Like any other kind of unit, they may "
"then pull in other units when activated (i\\&.e\\&. plugged in) and thus "
"implement device-based activation\\&. systemd dependencies may be encoded in "
"the udev database via the I<SYSTEMD_WANTS=> property\\&. See B<systemd."
"device>(5)  for details\\&. Often, it is nicer to pull in services from "
"devices only indirectly via dedicated targets\\&. Example: Instead of "
"pulling in bluetoothd\\&.service from all the various bluetooth dongles and "
"other hardware available, pull in bluetooth\\&.target from them and "
"bluetoothd\\&.service from that target\\&. This provides for nicer "
"abstraction and gives administrators the option to enable bluetoothd\\&."
"service via controlling a bluetooth\\&.target\\&.wants/ symlink uniformly "
"with a command like B<enable> of B<systemctl>(1)  instead of manipulating "
"the udev ruleset\\&."
msgstr ""

#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "Path-Based Activation"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Often, runtime of daemons processing spool files or directories (such as a "
"printing system) can be delayed until these file system objects change "
"state, or become non-empty\\&. New-style init systems provide a way to bind "
"service activation to file system changes\\&. systemd implements this scheme "
"via path-based activation configured in \\&.path units, as outlined in "
"B<systemd.path>(5)\\&."
msgstr ""

#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "Timer-Based Activation"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Some daemons that implement clean-up jobs that are intended to be executed "
"in regular intervals benefit from timer-based activation\\&. In systemd, "
"this is implemented via \\&.timer units, as described in B<systemd."
"timer>(5)\\&."
msgstr ""

#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "Other Forms of Activation"
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
msgid ""
"Other forms of activation have been suggested and implemented in some "
"systems\\&. However, there are often simpler or better alternatives, or they "
"can be put together of combinations of the schemes above\\&. Example: "
"Sometimes, it appears useful to start daemons or \\&.socket units when a "
"specific IP address is configured on a network interface, because network "
"sockets shall be bound to the address\\&. However, an alternative to "
"implement this is by utilizing the Linux B<IP_FREEBIND>/B<IPV6_FREEBIND> "
"socket option, as accessible via I<FreeBind=yes> in systemd socket files "
"(see B<systemd.socket>(5)  for details)\\&. This option, when enabled, "
"allows sockets to be bound to a non-local, not configured IP address, and "
"hence allows bindings to a particular IP address before it actually becomes "
"available, making such an explicit dependency to the configured address "
"redundant\\&. Another often suggested trigger for service activation is low "
"system load\\&. However, here too, a more convincing approach might be to "
"make proper use of features of the operating system, in particular, the CPU "
"or I/O scheduler of Linux\\&. Instead of scheduling jobs from userspace "
"based on monitoring the OS scheduler, it is advisable to leave the "
"scheduling of processes to the OS scheduler itself\\&. systemd provides fine-"
"grained access to the CPU and I/O schedulers\\&. If a process executed by "
"the service manager shall not negatively impact the amount of CPU or I/O "
"bandwidth available to other processes, it should be configured with "
"I<CPUSchedulingPolicy=idle> and/or I<IOSchedulingClass=idle>\\&. Optionally, "
"this may be combined with timer-based activation to schedule background jobs "
"during runtime and with minimal impact on the system, and remove it from the "
"boot phase itself\\&."
msgstr ""

#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "INTEGRATION WITH SYSTEMD"
msgstr ""

#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "Writing systemd Unit Files"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"When writing systemd unit files, it is recommended to consider the following "
"suggestions:"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If possible, do not use the I<Type=forking> setting in service files\\&. But "
"if you do, make sure to set the PID file path using I<PIDFile=>\\&. See "
"B<systemd.service>(5)  for details\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If your daemon registers a D-Bus name on the bus, make sure to use "
"I<Type=dbus> in the service file if possible\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Make sure to set a good human-readable description string with "
"I<Description=>\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Do not disable I<DefaultDependencies=>, unless you really know what you do "
"and your unit is involved in early boot or late system shutdown\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Normally, little if any dependencies should need to be defined "
"explicitly\\&. However, if you do configure explicit dependencies, only "
"refer to unit names listed on B<systemd.special>(7)  or names introduced by "
"your own package to keep the unit file operating system-independent\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Make sure to include an [Install] section including installation information "
"for the unit file\\&. See B<systemd.unit>(5)  for details\\&. To activate "
"your service on boot, make sure to add a I<WantedBy=multi-user\\&.target> or "
"I<WantedBy=graphical\\&.target> directive\\&. To activate your socket on "
"boot, make sure to add I<WantedBy=sockets\\&.target>\\&. Usually, you also "
"want to make sure that when your service is installed, your socket is "
"installed too, hence add I<Also=foo\\&.socket> in your service file foo\\&."
"service, for a hypothetical program foo\\&."
msgstr ""

#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "Installing systemd Service Files"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"At the build installation time (e\\&.g\\&.  B<make install> during package "
"build), packages are recommended to install their systemd unit files in the "
"directory returned by B<pkg-config systemd --variable=systemdsystemunitdir> "
"(for system services) or B<pkg-config systemd --variable=systemduserunitdir> "
"(for user services)\\&. This will make the services available in the system "
"on explicit request but not activate them automatically during boot\\&. "
"Optionally, during package installation (e\\&.g\\&.  B<rpm -i> by the "
"administrator), symlinks should be created in the systemd configuration "
"directories via the B<enable> command of the B<systemctl>(1)  tool to "
"activate them automatically on boot\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Packages using B<autoconf>(1)  are recommended to use a configure script "
"excerpt like the following to determine the unit installation path during "
"source configuration:"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"PKG_PROG_PKG_CONFIG()\n"
"AC_ARG_WITH([systemdsystemunitdir],\n"
"     [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],,\n"
"     [with_systemdsystemunitdir=auto])\n"
"AS_IF([test \"x$with_systemdsystemunitdir\" = \"xyes\" -o \"x$with_systemdsystemunitdir\" = \"xauto\"], [\n"
"     def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)\n"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"     AS_IF([test \"x$def_systemdsystemunitdir\" = \"x\"],\n"
"   [AS_IF([test \"x$with_systemdsystemunitdir\" = \"xyes\"],\n"
"    [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])\n"
"    with_systemdsystemunitdir=no],\n"
"   [with_systemdsystemunitdir=\"$def_systemdsystemunitdir\"])])\n"
"AS_IF([test \"x$with_systemdsystemunitdir\" != \"xno\"],\n"
"      [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])\n"
"AM_CONDITIONAL([HAVE_SYSTEMD], [test \"x$with_systemdsystemunitdir\" != \"xno\"])\n"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"This snippet allows automatic installation of the unit files on systemd "
"machines, and optionally allows their installation even on machines lacking "
"systemd\\&. (Modification of this snippet for the user unit directory is "
"left as an exercise for the reader\\&.)"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Additionally, to ensure that B<make distcheck> continues to work, it is "
"recommended to add the following to the top-level Makefile\\&.am file in "
"B<automake>(1)-based projects:"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"AM_DISTCHECK_CONFIGURE_FLAGS = \\e\n"
"  --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)\n"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Finally, unit files should be installed in the system with an automake "
"excerpt like the following:"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"if HAVE_SYSTEMD\n"
"systemdsystemunit_DATA = \\e\n"
"  foobar\\&.socket \\e\n"
"  foobar\\&.service\n"
"endif\n"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"In the B<rpm>(8)  \\&.spec file, use snippets like the following to enable/"
"disable the service during installation/deinstallation\\&. This makes use of "
"the RPM macros shipped along systemd\\&. Consult the packaging guidelines of "
"your distribution for details and the equivalent for other package "
"managers\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "At the top of the file:"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"BuildRequires: systemd\n"
"%{?systemd_requires}\n"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "And as scriptlets, further down:"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"%post\n"
"%systemd_post foobar\\&.service foobar\\&.socket\n"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"%preun\n"
"%systemd_preun foobar\\&.service foobar\\&.socket\n"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"%postun\n"
"%systemd_postun\n"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If the service shall be restarted during upgrades, replace the \"%postun\" "
"scriptlet above with the following:"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"%postun\n"
"%systemd_postun_with_restart foobar\\&.service\n"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Note that \"%systemd_post\" and \"%systemd_preun\" expect the names of all "
"units that are installed/removed as arguments, separated by spaces\\&.  "
"\"%systemd_postun\" expects no arguments\\&.  "
"\"%systemd_postun_with_restart\" expects the units to restart as "
"arguments\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"To facilitate upgrades from a package version that shipped only SysV init "
"scripts to a package version that ships both a SysV init script and a native "
"systemd service file, use a fragment like the following:"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"%triggerun -- foobar E<lt> 0\\&.47\\&.11-1\n"
"if /sbin/chkconfig --level 5 foobar ; then\n"
"  /bin/systemctl --no-reload enable foobar\\&.service foobar\\&.socket E<gt>/dev/null 2E<gt>&1 || :\n"
"fi\n"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Where 0\\&.47\\&.11-1 is the first package version that includes the native "
"unit file\\&. This fragment will ensure that the first time the unit file is "
"installed, it will be enabled if and only if the SysV init script is "
"enabled, thus making sure that the enable status is not changed\\&. Note "
"that B<chkconfig> is a command specific to Fedora which can be used to check "
"whether a SysV init script is enabled\\&. Other operating systems will have "
"to use different commands here\\&."
msgstr ""

#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "PORTING EXISTING DAEMONS"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Since new-style init systems such as systemd are compatible with traditional "
"SysV init systems, it is not strictly necessary to port existing daemons to "
"the new style\\&. However, doing so offers additional functionality to the "
"daemons as well as simplifying integration into new-style init systems\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"To port an existing SysV compatible daemon, the following steps are "
"recommended:"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If not already implemented, add an optional command line switch to the "
"daemon to disable daemonization\\&. This is useful not only for using the "
"daemon in new-style init systems, but also to ease debugging\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-tumbleweed
msgid ""
"If the daemon offers interfaces to other software running on the local "
"system via local B<AF_UNIX> sockets, consider implementing socket-based "
"activation (see above)\\&. Usually, a minimal patch is sufficient to "
"implement this: Extend the socket creation in the daemon code so that "
"B<sd_listen_fds>(3)  is checked for already passed sockets first\\&. If "
"sockets are passed (i\\&.e\\&. when B<sd_listen_fds()> returns a positive "
"value), skip the socket creation step and use the passed sockets\\&. "
"Secondly, ensure that the file system socket nodes for local B<AF_UNIX> "
"sockets used in the socket-based activation are not removed when the daemon "
"shuts down, if sockets have been passed\\&. Third, if the daemon normally "
"closes all remaining open file descriptors as part of its initialization, "
"the sockets passed from the service manager must be spared\\&. Since new-"
"style init systems guarantee that no left-over file descriptors are passed "
"to executed processes, it might be a good choice to simply skip the closing "
"of all remaining open file descriptors if sockets are passed\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Write and install a systemd unit file for the service (and the sockets if "
"socket-based activation is used, as well as a path unit file, if the daemon "
"processes a spool directory), see above for details\\&."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If the daemon exposes interfaces via D-Bus, write and install a D-Bus "
"activation file for the service, see above for details\\&."
msgstr ""

#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "PLACING DAEMON DATA"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"It is recommended to follow the general guidelines for placing package "
"files, as discussed in B<file-hierarchy>(7)\\&."
msgstr ""

#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "SEE ALSO"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"B<systemd>(1), B<sd-daemon>(3), B<sd_listen_fds>(3), B<sd_notify>(3), "
"B<daemon>(3), B<systemd.service>(5), B<file-hierarchy>(7)"
msgstr ""

#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "NOTES"
msgstr ""

#. type: IP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid " 1."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "LSB recommendations for SysV init scripts"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"\\%http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/"
"iniscrptact.html"
msgstr ""

#. type: IP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid " 2."
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "Apple MacOS X Daemon Requirements"
msgstr ""

#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"\\%https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/"
"BPSystemStartup/Chapters/CreatingLaunchdJobs.html"
msgstr ""

#. type: TH
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid "systemd 254"
msgstr ""

#. type: Plain text
#: debian-bookworm fedora-40 opensuse-leap-15-6
msgid ""
"In the child, call B<fork()> again, to ensure that the daemon can never re-"
"acquire a terminal again\\&. (This relevant if the program \\(em and all its "
"dependencies \\(em does not carefully specify `O_NOCTTY` on each and every "
"single `open()` call that might potentially open a TTY device node\\&.)"
msgstr ""

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"For developing a new-style daemon, none of the initialization steps "
"recommended for SysV daemons need to be implemented\\&. New-style init "
"systems such as systemd make all of them redundant\\&. Moreover, since some "
"of these steps interfere with process monitoring, file descriptor passing "
"and other functionality of the init system, it is recommended not to execute "
"them when run as new-style service\\&."
msgstr ""

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid "If B<SIGTERM> is received, shut down the daemon and exit cleanly\\&."
msgstr ""

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"If B<SIGHUP> is received, reload the configuration files, if this applies\\&."
msgstr ""

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"Provide a correct exit code from the main daemon process, as this is used by "
"the init system to detect service errors and problems\\&. It is recommended "
"to follow the exit code scheme as defined in the \\m[blue]B<LSB "
"recommendations for SysV init scripts>\\m[]\\&\\s-2\\u[1]\\d\\s+2\\&."
msgstr ""

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"As much as possible, rely on the init system\\*(Aqs functionality to limit "
"the access of the daemon to files, services and other resources, i\\&.e\\&. "
"in the case of systemd, rely on systemd\\*(Aqs resource limit control "
"instead of implementing your own, rely on systemd\\*(Aqs privilege dropping "
"code instead of implementing it in the daemon, and similar\\&. See B<systemd."
"exec>(5)  for the available controls\\&."
msgstr ""

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"If applicable, a daemon should notify the init system about startup "
"completion or status updates via the B<sd_notify>(3)  interface\\&."
msgstr ""

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"Instead of using the B<syslog()> call to log directly to the system syslog "
"service, a new-style daemon may choose to simply log to standard error via "
"B<fprintf()>, which is then forwarded to syslog by the init system\\&. If "
"log levels are necessary, these can be encoded by prefixing individual log "
"lines with strings like \"E<lt>4E<gt>\" (for log level 4 \"WARNING\" in the "
"syslog priority scheme), following a similar style as the Linux "
"kernel\\*(Aqs B<printk()> level system\\&. For details, see B<sd-daemon>(3)  "
"and B<systemd.exec>(5)\\&."
msgstr ""

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"As new-style daemons are invoked without a controlling TTY (but as their own "
"session leaders) care should be taken to always specify `O_NOCTTY` on "
"`open()` calls that possibly reference a TTY device node, so that no "
"controlling TTY is accidentally acquired\\&."
msgstr ""

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"Old-style daemons are usually activated exclusively on boot (and manually by "
"the administrator) via SysV init scripts, as detailed in the \\m[blue]B<LSB "
"Linux Standard Base Core Specification>\\m[]\\&\\s-2\\u[1]\\d\\s+2\\&. This "
"method of activation is supported ubiquitously on Linux init systems, both "
"old-style and new-style systems\\&. Among other issues, SysV init scripts "
"have the disadvantage of involving shell scripts in the boot process\\&. New-"
"style init systems generally employ updated versions of activation, both "
"during boot-up and during runtime and using more minimal service description "
"files\\&."
msgstr ""

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"In order to maximize the possible parallelization and robustness and "
"simplify configuration and development, it is recommended for all new-style "
"daemons that communicate via listening sockets to employ socket-based "
"activation\\&. In a socket-based activation scheme, the creation and binding "
"of the listening socket as primary communication channel of daemons to local "
"(and sometimes remote) clients is moved out of the daemon code and into the "
"init system\\&. Based on per-daemon configuration, the init system installs "
"the sockets and then hands them off to the spawned process as soon as the "
"respective daemon is to be started\\&. Optionally, activation of the service "
"can be delayed until the first inbound traffic arrives at the socket to "
"implement on-demand activation of daemons\\&. However, the primary advantage "
"of this scheme is that all providers and all consumers of the sockets can be "
"started in parallel as soon as all sockets are established\\&. In addition "
"to that, daemons can be restarted with losing only a minimal number of "
"client transactions, or even any client request at all (the latter is "
"particularly true for state-less protocols, such as DNS or syslog), because "
"the socket stays bound and accessible during the restart, and all requests "
"are queued while the daemon cannot process them\\&."
msgstr ""

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"New-style daemons which support socket activation must be able to receive "
"their sockets from the init system instead of creating and binding them "
"themselves\\&. For details about the programming interfaces for this scheme "
"provided by systemd, see B<sd_listen_fds>(3)  and B<sd-daemon>(3)\\&. For "
"details about porting existing daemons to socket-based activation, see "
"below\\&. With minimal effort, it is possible to implement socket-based "
"activation in addition to traditional internal socket creation in the same "
"codebase in order to support both new-style and old-style init systems from "
"the same daemon binary\\&."
msgstr ""

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"When the D-Bus IPC system is used for communication with clients, new-style "
"daemons should employ bus activation so that they are automatically "
"activated when a client application accesses their IPC interfaces\\&. This "
"is configured in D-Bus service files (not to be confused with systemd "
"service unit files!)\\&. To ensure that D-Bus uses systemd to start-up and "
"maintain the daemon, use the I<SystemdService=> directive in these service "
"files to configure the matching systemd service for a D-Bus service\\&. e\\&."
"g\\&.: For a D-Bus service whose D-Bus activation file is named org\\&."
"freedesktop\\&.RealtimeKit\\&.service, make sure to set "
"I<SystemdService=rtkit-daemon\\&.service> in that file to bind it to the "
"systemd service rtkit-daemon\\&.service\\&. This is needed to make sure that "
"the daemon is started in a race-free fashion when activated via multiple "
"mechanisms simultaneously\\&."
msgstr ""

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"Other forms of activation have been suggested and implemented in some "
"systems\\&. However, there are often simpler or better alternatives, or they "
"can be put together of combinations of the schemes above\\&. Example: "
"Sometimes, it appears useful to start daemons or \\&.socket units when a "
"specific IP address is configured on a network interface, because network "
"sockets shall be bound to the address\\&. However, an alternative to "
"implement this is by utilizing the Linux B<IP_FREEBIND>/B<IPV6_FREEBIND> "
"socket option, as accessible via I<FreeBind=yes> in systemd socket files "
"(see B<systemd.socket>(5)  for details)\\&. This option, when enabled, "
"allows sockets to be bound to a non-local, not configured IP address, and "
"hence allows bindings to a particular IP address before it actually becomes "
"available, making such an explicit dependency to the configured address "
"redundant\\&. Another often suggested trigger for service activation is low "
"system load\\&. However, here too, a more convincing approach might be to "
"make proper use of features of the operating system, in particular, the CPU "
"or I/O scheduler of Linux\\&. Instead of scheduling jobs from userspace "
"based on monitoring the OS scheduler, it is advisable to leave the "
"scheduling of processes to the OS scheduler itself\\&. systemd provides fine-"
"grained access to the CPU and I/O schedulers\\&. If a process executed by "
"the init system shall not negatively impact the amount of CPU or I/O "
"bandwidth available to other processes, it should be configured with "
"I<CPUSchedulingPolicy=idle> and/or I<IOSchedulingClass=idle>\\&. Optionally, "
"this may be combined with timer-based activation to schedule background jobs "
"during runtime and with minimal impact on the system, and remove it from the "
"boot phase itself\\&."
msgstr ""

#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
msgid ""
"If the daemon offers interfaces to other software running on the local "
"system via local B<AF_UNIX> sockets, consider implementing socket-based "
"activation (see above)\\&. Usually, a minimal patch is sufficient to "
"implement this: Extend the socket creation in the daemon code so that "
"B<sd_listen_fds>(3)  is checked for already passed sockets first\\&. If "
"sockets are passed (i\\&.e\\&. when B<sd_listen_fds()> returns a positive "
"value), skip the socket creation step and use the passed sockets\\&. "
"Secondly, ensure that the file system socket nodes for local B<AF_UNIX> "
"sockets used in the socket-based activation are not removed when the daemon "
"shuts down, if sockets have been passed\\&. Third, if the daemon normally "
"closes all remaining open file descriptors as part of its initialization, "
"the sockets passed from the init system must be spared\\&. Since new-style "
"init systems guarantee that no left-over file descriptors are passed to "
"executed processes, it might be a good choice to simply skip the closing of "
"all remaining open file descriptors if sockets are passed\\&."
msgstr ""

#. type: TH
#: debian-unstable fedora-rawhide
#, no-wrap
msgid "systemd 256~rc3"
msgstr ""

#. type: Plain text
#: fedora-40
msgid ""
"If the service opens sockets or other files on it own, and those file "
"descriptors shall survive a restart, the daemon should store them in the "
"service manager via B<sd_notify>(3)  with I<FDSTORE=1>\\&.\\&."
msgstr ""