Date: Thu, 27 May 2021 16:56:12 +0700 From: Eugene Grosbein <eugen@grosbein.net> To: Ingeborg Hellemo <ingeborg.hellemo@uit.no>, freebsd-stable@freebsd.org Subject: Re: Service started via service(8) fails Message-ID: <f4494f4f-0676-524e-b152-c861593a084b@grosbein.net> In-Reply-To: <202105270818.14R8Ig20087984@nordnytt.cc.uit.no> References: <202105270818.14R8Ig20087984@nordnytt.cc.uit.no>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f4494f4f-0676-524e-b152-c861593a084b>