Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 May 2021 12:19:01 +0200
From:      "Patrick M. Hausen" <hausen@punkt.de>
To:        freebsd-stable stable <freebsd-stable@freebsd.org>
Subject:   Re: Service started via service(8) fails
Message-ID:  <E54A85CC-673A-4617-AEFB-2877BF0F5EE4@punkt.de>
In-Reply-To: <f4494f4f-0676-524e-b152-c861593a084b@grosbein.net>
References:  <202105270818.14R8Ig20087984@nordnytt.cc.uit.no> <f4494f4f-0676-524e-b152-c861593a084b@grosbein.net>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Hi all,

> Am 27.05.2021 um 11:56 schrieb Eugene Grosbein <eugen@grosbein.net>:
> 
> 27.05.2021 15:18, Ingeborg Hellemo wrote:
> 
>> FreeBSD 11.4-RELEASE-p3
>> 
>> What, if any, difference is there between using 'service <something> restart'
>> and /usr/local/etc/rc.d/<something> restart'?
>> 
>> I have this mindboggling situation where using 'service tac_plus restart'
>> leads to a service that is running but not working properly, whereas
>> '/usr/local/etc/rc.d/tac_plus restart' gives me a working service.
> 
> The "service" command resets the environment  but direct script invocation inherits the environment.
> Such problem often is a sign of wrong startup script or configuration of the service
> that makes incorrect assumption about PATH and/or locale settings.
> It may fail to find some commands because it does not set PATH to include /usr/local/... directories
> or fail due to incorrect locale assumptions or even TZ (time zone) settings.

Since /usr/sbin/service is itself a shell script you could try

sh -x /usr/sbin/service tac_plus restart
sh -x /usr/local/etc/rc.d/tac_plus restart

and compare what is actually executed.

Kind regards,
Patrick
--
punkt.de GmbH
Patrick M. Hausen
.infrastructure

Kaiserallee 13a
76133 Karlsruhe

Tel. +49 721 9109500

https://infrastructure.punkt.de
info@punkt.de

AG Mannheim 108285
Geschäftsführer: Jürgen Egeling, Daniel Lienert, Fabian Stein


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEgzqrjO/mj9CSsTg2kG8u4u3aiVwFAmCvchUACgkQkG8u4u3a
iVzLTgf7Buavle4bgMQ0gOpJzKtUugZvva0CPQ1/1+GNqOZAAoCJzg4tSN0h2xrE
fV0k24r7UBo9Dmko7LtksgS0/cD1FVSn/ZU4TzAQnBJlXfiVHoEiVHJeT+Hb/LZb
hx7jM5Ogq7Ib7XkhyEKjrzS9qMAUOCgYXciaqOvVWp3tqVM6xa5Gg4CUrlK/dY1N
Q2R6DKjyk+Kmnt9p/gyi0tBXVuzj88q9eAnL9d1XYkCXEPz0fToN+8tSzJ6THYC0
O7FZLxp+wqr6YqEAHwFrDN8H4TPw58jDPcidXjurWSR+l84mhLp1/gZ1cpSIrAU6
y5xU9DdTawTOZ58Jx3gEDpbXfT9Whg==
=i0YY
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E54A85CC-673A-4617-AEFB-2877BF0F5EE4>