kopia lustrzana https://gitlab.com/sane-project/backends
Added systemd configuration in saned manpage
rodzic
d4a309cd4e
commit
5c21d5d978
106
doc/saned.man
106
doc/saned.man
|
@ -44,7 +44,7 @@ flags request that
|
||||||
.B saned
|
.B saned
|
||||||
run in debug mode (as opposed to
|
run in debug mode (as opposed to
|
||||||
.BR inetd (8)
|
.BR inetd (8)
|
||||||
mode). In this mode,
|
daemon mode). In this mode,
|
||||||
.B saned
|
.B saned
|
||||||
explicitly waits for a connection request. When compiled with
|
explicitly waits for a connection request. When compiled with
|
||||||
debugging enabled, these flags may be followed by a number to request
|
debugging enabled, these flags may be followed by a number to request
|
||||||
|
@ -60,7 +60,7 @@ requests using syslog.
|
||||||
.PP
|
.PP
|
||||||
If
|
If
|
||||||
.B saned
|
.B saned
|
||||||
is run from inetd or xinetd, no option can be given.
|
is run from inetd, xinetdi or systemd, no option can be given.
|
||||||
.SH CONFIGURATION
|
.SH CONFIGURATION
|
||||||
First and foremost:
|
First and foremost:
|
||||||
.B saned
|
.B saned
|
||||||
|
@ -123,21 +123,43 @@ scan\-client.somedomain.firm
|
||||||
.PP
|
.PP
|
||||||
The case of the host names does not matter, so AHost.COM is considered
|
The case of the host names does not matter, so AHost.COM is considered
|
||||||
identical to ahost.com.
|
identical to ahost.com.
|
||||||
.SH INETD CONFIGURATION
|
.SH SERVER DAEMON CONFIGURATION
|
||||||
For
|
For
|
||||||
.B saned
|
.B saned
|
||||||
to work properly in its default mode of operation, it is also necessary to add
|
to work properly in its default mode of operation, it is also necessary to
|
||||||
a configuration line to
|
add the appropriate configuration for
|
||||||
.IR /etc/inetd.conf .
|
.I (x)inetd or systemd.
|
||||||
|
(see below).
|
||||||
Note that your inetd must support IPv6 if you
|
Note that your inetd must support IPv6 if you
|
||||||
want to connect to saned over IPv6 ; xinetd and openbsd-inetd are known to
|
want to connect to saned over IPv6 ; xinetd, openbsd-inetd and systemd
|
||||||
support IPv6, check the documentation for your inetd daemon.
|
are known to support IPv6, check the documentation for your inetd daemon.
|
||||||
|
.PP
|
||||||
|
In the sections below the configuration for
|
||||||
|
.I inetd, xinetd
|
||||||
|
and
|
||||||
|
.I systemd
|
||||||
|
are described in more detail.
|
||||||
|
.PP
|
||||||
|
For the configurations below it is necessary to add a line of the following
|
||||||
|
form to
|
||||||
|
.IR /etc/services :
|
||||||
|
.PP
|
||||||
|
.RS
|
||||||
|
sane\-port 6566/tcp # SANE network scanner daemon
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
The official IANA short name for port 6566 is "sane\-port". The older name
|
||||||
|
"sane" is now deprecated.
|
||||||
|
.SH INETD CONFIGURATION
|
||||||
|
It is required to add a single line to the inetd configuration file
|
||||||
|
.IR (/etc/inetd.conf)
|
||||||
|
.
|
||||||
.PP
|
.PP
|
||||||
The configuration line normally looks like this:
|
The configuration line normally looks like this:
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
sane\-port stream tcp nowait saned.saned @SBINDIR@/saned saned
|
sane\-port stream tcp nowait saned.saned @SBINDIR@/saned saned
|
||||||
.RE
|
.E
|
||||||
.PP
|
.PP
|
||||||
However, if your system uses
|
However, if your system uses
|
||||||
.BR tcpd (8)
|
.BR tcpd (8)
|
||||||
|
@ -161,9 +183,11 @@ access permissions on the special device are set such that
|
||||||
.B saned
|
.B saned
|
||||||
can access the scanner (the program generally needs read and
|
can access the scanner (the program generally needs read and
|
||||||
write access to scanner devices).
|
write access to scanner devices).
|
||||||
.PP
|
.SH XINETD CONFIGURATION
|
||||||
If xinetd is installed on your system instead of inetd the following example
|
If xinetd is installed on your system instead of inetd the following example
|
||||||
for xinetd.conf may be helpful:
|
for
|
||||||
|
.I /etc/xinetd.conf
|
||||||
|
may be helpful:
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
.ft CR
|
.ft CR
|
||||||
|
@ -184,17 +208,67 @@ service sane\-port
|
||||||
.fi
|
.fi
|
||||||
.ft R
|
.ft R
|
||||||
.RE
|
.RE
|
||||||
|
.SH SYSTEMD CONFIGURATION
|
||||||
|
for systemd we need to add 2 configuation files in
|
||||||
|
.I /etc/systemd/system.
|
||||||
.PP
|
.PP
|
||||||
Finally, it is also necessary to add a line of the following form to
|
The first file we need to add here is called
|
||||||
.IR /etc/services :
|
.I saned.socket.
|
||||||
|
It shall have
|
||||||
|
the following contents:
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
sane\-port 6566/tcp # SANE network scanner daemon
|
.ft CR
|
||||||
|
.nf
|
||||||
|
[Unit]
|
||||||
|
Description=saned incoming socket
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=6566
|
||||||
|
Accept=yes
|
||||||
|
MaxConnections=1
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sockets.target
|
||||||
|
.fi
|
||||||
|
.ft R
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
The official IANA short name for port 6566 is "sane\-port". The older name "sane"
|
The second file to be added is
|
||||||
is now deprecated.
|
.I saned@.service
|
||||||
|
with the following contents:
|
||||||
|
.PP
|
||||||
|
.RS
|
||||||
|
.ft CR
|
||||||
|
.nf
|
||||||
|
[Unit]
|
||||||
|
Description=Scanner Service
|
||||||
|
Requires=saned.socket
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/saned
|
||||||
|
User=saned
|
||||||
|
Group=saned
|
||||||
|
StandardInput=null
|
||||||
|
StandardOutput=syslog
|
||||||
|
StandardError=syslog
|
||||||
|
# Environment=SANE_CONFIG_DIR=@CONFIGDIR@ SANE_DEBUG_DLL=255
|
||||||
|
.fi
|
||||||
|
.ft R
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
Is you need to set an environment variable for saned like
|
||||||
|
.B SANE_CONFIG_DIR
|
||||||
|
you will have to remove the # on the last line and set the variable
|
||||||
|
appropriately. Multiple variables can be set by separating the assignments
|
||||||
|
by spaces as shown in the example above.
|
||||||
|
.PP
|
||||||
|
Unlike
|
||||||
|
.I (x)inetd
|
||||||
|
systemd allows debugging output from backends set using
|
||||||
|
.B SANE_DEBUG_<backend_name>
|
||||||
|
to be captured. With the service unit as described above, the debugging output is
|
||||||
|
forwarded to the system log.
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.TP
|
.TP
|
||||||
.I /etc/hosts.equiv
|
.I /etc/hosts.equiv
|
||||||
|
|
Ładowanie…
Reference in New Issue