[Mageia-discuss] systemd and faxgetty

Jim Whitby jim at whitby-jr.org
Mon Jun 25 23:02:39 CEST 2012


On 06/21/2012 10:18 PM, Jim Whitby wrote:
<snip>

I have managed to put together the files needed for hylafax, probably 
not optimal, but working.
The server file ( hylafax-server.service) is placed in etc/systemd/system.
Contains:

[Unit]
Description=Daemon for hylafax server
After=syslog.target

[Service]
ExecStart=/usr/sbin/faxq
Type=forking

[Install]
WantedBy=multi-user.target


A template file ( faxgetty at .service ) is linked to 
/etc/systemd/system/faxgetty at ttyS0.service.
This will start a faxgetty on ttyS0 as a daemon and restart as needed.
If I need another fax getty on ttyS1 then I just create a new link with 
the name S1 instead of S0.

The faxgetty (faxgetty at .service) file is in /lib/systemd/system
Contains:

[Unit]
Description=Fax Getty on %I
BindTo=dev-%i.device
After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
After=rc-local.service

# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes

[Service]
ExecStart=-/usr/sbin/faxgetty  %I
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no

# Some login implementations ignore SIGTERM, so we send SIGHUP
# instead, to ensure that login terminates cleanly.
KillSignal=SIGHUP

I'm sure some of the above is not needed, but until someone who knows 
more than me explains it, I'll leave it alone.


-- 
Programmers used to batch environments may find it hard to live without
giant listings; we would find it hard to use them.
		-- D.M. Ritchie
----------------------
Mageia release 2 (Official) for x86_64
3.3.6-desktop-2.mga2 x86_64
----------------------



More information about the Mageia-discuss mailing list