[systemd-devel] Disabling tomcat8

Reindl Harald h.reindl at thelounge.net
Wed Dec 20 13:59:32 UTC 2017



Am 20.12.2017 um 14:52 schrieb Tom H:
> On Tue, Dec 19, 2017 at 2:34 PM, Reindl Harald <h.reindl at thelounge.net> wrote:
>> Am 19.12.2017 um 20:05 schrieb Lennart Poettering:
>>> On Mo, 18.12.17 19:40, Cecil Westerhof (cldwesterhof at gmail.com) wrote:
> 
> 
>>>> There is a system with tomcat8 installed and enabled. At the moment it is
>>>> not used, so I thought it better to disable it.
>>>>
>>>> When I enter:
>>>>       systemctl disable tomcat8.service
>>>>
>>>> I get:
>>>>       tomcat8.service is not a native service, redirecting to
>>>> systemd-sysv-install.
>>>>       Executing: /lib/systemd/systemd-sysv-install disable tomcat8
>>>
>>> This means the service in question is not a native systemd service,
>>> but a legacy SysV service, that is only hooked in with distro-specific
>>> shell glue. If that doesn't work it's not an upstream issue, you need
>>> to contact your downstream distribution for help, as they put together
>>> the shell script glue
>>
>> in 2017 it shpuld be a native systemd-unit but from where comes the "vendor
>> preset: enabled" in case of a generated unit?
> 
> The usual reason for not having a native unit is that you can't force
> developers to do that work. Also, some sysvrc scripts are so
> convoluted that the developers prefer to let the generator take care
> of business

in doubt where is the problem to point ExecStart/Stop to the elsewehere 
located sysv-initscript even without change that?

the benefit is that you still have the 
/etc/systemd/system/servicename.service.d snippets and can use namespace 
options like ReadOnlyDirectory and so on as well as 
override/disable/enable works proper for around 10 minutes of work

guess what Fedora did with "iptables.service"

so no, i don't see an excuse after that many years for crap within 
/etc/init.d/

[root at srv-rhsoft:~]$ cat /usr/libexec/iptables/iptables.init start
#!/bin/bash
#
# iptables      Start iptables firewall
#
# chkconfig: 2345 08 92
# description:  Starts, stops and saves iptables firewall
#
# config: /etc/sysconfig/iptables
# config: /etc/sysconfig/iptables-config
#
### BEGIN INIT INFO
# Provides: iptables
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop iptables firewall
# Description: Start, stop and save iptables firewall
### END INIT INFO
[root at srv-rhsoft:~]$ cat /usr/lib/systemd/system/iptables.service
[Unit]
Description=IPv4 firewall with iptables
After=syslog.target
AssertPathExists=/etc/sysconfig/iptables

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/libexec/iptables/iptables.init start
ExecReload=/usr/libexec/iptables/iptables.init reload
ExecStop=/usr/libexec/iptables/iptables.init stop
Environment=BOOTUP=serial
Environment=CONSOLETYPE=serial
StandardOutput=syslog
StandardError=syslog

[Install]
WantedBy=basic.target
[root at srv-rhsoft:~]$



More information about the systemd-devel mailing list