hylafax und restart

Alle weiteren Dienste, die nicht in die drei oberen Foren gehören.
Antworten
Foxingtion
Beiträge: 24
Registriert: 24.04.2004 19:54:36

hylafax und restart

Beitrag von Foxingtion » 02.05.2016 08:37:52

Not starting HylaFAX daemons since they are already running.
Hallo Zusammen,

ich habe mir einen Debian Jessie mit Hylafax aufgesetzt, 1x usb/seriellen und 1x iax-Modem.

Seit ich das iaxmodem hinzugefügt habe per "faxaddmodem ttyIAX0" und den Dienst neu starten wollte, erhielt ich den o.g. Fehler. So wie ich dies bisher verstanden habe, baut Hylafax auf inittab, welches systemd nicht nutzt.

Ich muss als bisherige temporäre Lösung den Server bei jeder Änderung neu starten, hab Ihr mir einen Tip, wo ich hier ansetzen kann?

Vielen Dank

/etc/default/hylafax:
# default settings for hylafax server

# try to check for the correct USE_FAXGETTY value
if grep -E '^[^#]*:respawn:/usr/sbin/fax(getty|modem).*$' /etc/inittab >/dev/null 2>&1 || grep -E '^exec[ \t]*/usr/sbin/fax(getty|modem)' /etc/init/*.conf >/dev/null 2>&1
then
USE_FAXGETTY=init
else
USE_FAXGETTY=yes
fi

# Arguments for faxgetty command. At least -D should be specified
# as explained in debian bug #462459.
FAXGETTYARGS="-D"

# In a send only installation you may want to use faxgetty
# or faxmodem on lines already configured with faxaddmodem.
# faxgetty is the new default, faxmodem the old one.
# For a better understanding of the difference between faxmodem
# and faxgetty, see http://www.hylafax.org/archive/1999-09/msg00043.php
#
# In a send/receive installation you must use faxgetty.
#
# To use faxmodem change the following variable value to "no".
#
# You may also prefer to run faxmodem/faxgetty via inittab instead of
# running it here from a script. In this case set its value as
# "init".
# USE_FAXGETTY=yes

#
# Uncomment this line once hylafax has been fully configured and/or
# you want to enable the server.
#
RUN_HYLAFAX=1

#
# If you need to bind hylafax to one address only, just uncomment
# this variable and change the value using your preferred IP.
#
BINDTO="-l 127.0.0.1"

#
# The following variables are automatically assigned by running
# the faxsetup utility. If you leave them commented out then
# faxsetup values are used. You may specify here the values to
# use.
#
# OLDPROT="-o 4557"
# NEWPROT="-i 4559"
# SNPP="-s 444"

#
# hfaxd may be run from inetd while faxq should still be executed
# by the init script. If you run hfax via inetd or xinetd then
# uncomment the following line
# HFAXD_FROM_INET=true
Do not change a running System ^^

rendegast
Beiträge: 15041
Registriert: 27.02.2006 16:50:33
Lizenz eigener Beiträge: MIT Lizenz

Re: hylafax und restart

Beitrag von rendegast » 08.05.2016 21:37:14

baut Hylafax auf inittab, welches systemd nicht nutzt.
systemd benutzt ein init.d/-Skript
wenn eine entsprechende *.service-Unit nicht vorhanden ist.
Es werden dann on-the-fly service-Units erstellt, Bsp.:

Code: Alles auswählen

# find /run/ | grep smbd.service
/run/systemd/generator.late/smbd.service
/run/systemd/generator.late/runlevel5.target.wants/smbd.service
/run/systemd/generator.late/runlevel4.target.wants/smbd.service
/run/systemd/generator.late/runlevel3.target.wants/smbd.service


# cat /run/systemd/generator.late/smbd.service 
# Automatically generated by systemd-sysv-generator
...
ExecStart=/etc/init.d/smbd start
ExecStop=/etc/init.d/smbd stop
ExecReload=/etc/init.d/smbd reload

Zum einen
hylafax-server_3%3a6.0.6-6_amd64/etc/init.d/hylafax
faxgetty aus diesem Skript oder gar nicht <-> USE_FAXGETTY=yes/no
->
/etc/init.d/hylafax restart
service hylafax restart
systemctl restart hylafax


Andererseits faxgetty per inittab, anderer Fundort in faxsetup

Code: Alles auswählen

$ grep inittab -C2 faxsetup
            fi
        else
            if [ -f /etc/inittab ]; then
                FAXGETTY="`$GREP '[^#].*:respawn:faxgetty.*' /etc/inittab`"
            elif [ -f /etc/ttys ]; then
                FAXGETTY="`$GREP '[^#].*faxgetty.*' /etc/ttys`"
<-> USE_FAXGETTY=init für das init.d/hylafax.
In dem Fall sollte es reichen, den Prozeß faxgetty zu killen,
'respawn' sorgt für den Neustart.




Paket Debiancapi4hylafax nimmt auf einen inittab-Eintrag scheinbar nur entfernend in seinem postrm Bezug.
Gesetzt würde ein solcher Eintrag aber wohl nur von einem Skript 'install',
des eigentlichen Quelltextes.
mfg rendegast
-----------------------
Viel Eifer, viel Irrtum; weniger Eifer, weniger Irrtum; kein Eifer, kein Irrtum.
(Lin Yutang "Moment in Peking")

Antworten