Discussion:
systemd and saned
(too old to reply)
ToddAndMargo
2017-11-11 05:28:52 UTC
Permalink
Raw Message
Dear Sane List,

Google is failing me here.

I need to get saned running as a service under systemd.
Does anyone have a paper on how to do this?

Do I need to write my own systemd script?

Many thanks,
-T


# find /usr/lib/systemd -iname \*saned\*
<nothing>

# yum --enablerepo=* whatprovides saned
sane-backends-1.0.24-9.el7.x86_64 : Scanner access software
Repo        : @sl
Matched from:
Filename    : /usr/sbin/saned

# rpm -qa sane-backends
sane-backends-1.0.24-9.el7.x86_64
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
Guillaume Courtois
2017-11-11 16:22:26 UTC
Permalink
Raw Message
Oups, I did not send it to the list :-(
Hi,
Yes, you have to create a systemd unit. It's pretty simple, I'm
surprised you don't find any example on the internet.
Basically, you create the file in the right format
(your_service.service), put it in /etc/systemd/system and do systemctl
enable your_service then systemctl start your_service and that's all.
[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=/etc/sane.d
# Environment=SANE_CONFIG_DIR=/etc/sane.d SANE_DEBUG_DLL=255
[Install]
Also=saned.socket
Bye.
Post by ToddAndMargo
Dear Sane List,
Google is failing me here.
I need to get saned running as a service under systemd.
Does anyone have a paper on how to do this?
Do I need to write my own systemd script?
Many thanks,
-T
# find /usr/lib/systemd -iname \*saned\*
<nothing>
# yum --enablerepo=* whatprovides saned
sane-backends-1.0.24-9.el7.x86_64 : Scanner access software
Filename    : /usr/sbin/saned
# rpm -qa sane-backends
sane-backends-1.0.24-9.el7.x86_64
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Louis Lagendijk
2017-11-11 16:58:34 UTC
Permalink
Raw Message
Post by ToddAndMargo
Dear Sane List,
Google is failing me here.
I need to get saned running as a service under systemd.
Does anyone have a paper on how to do this?
That may depend on your distribution. The saned man-page gives an
example (it actually gives 2 examples, depending on whether your saned
is compiled with systemd support)

Louis
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
ToddAndMargo
2017-11-15 19:48:20 UTC
Permalink
Raw Message
https://www.freedesktop.org/software/systemd/man/systemd.service.html
from example 1
    "Since no ExecStop= was specified, systemd will send SIGTERM
    to all processes started from this service, and after
    a timeout also SIGKILL. This behavior can be modified, see
    systemd.kill(5) for details."
I couldn't find anyuthing on ExecReload
That seems normal, if no stop action is given, systemd will kill
remaining processes.
All init scripts do the same.
I got this back from Ask Fedora:


$ sudo systemctl reload bluetooth
Failed to reload bluetooth.service: Job type reload is not applicable
for unit bluetooth.service.
See system logs and 'systemctl status bluetooth.service' for details.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Loading...