8
rated 0 times
[
8]
[
0]
/ answers: 1 / hits: 4267
/ 2 Years ago, thu, september 1, 2022, 10:12:11
A lot of services in CentOS look like this (except green and red, respectively):
$ sudo service blah start
Starting blah: [ OK ]
$ sudo service notrunning stop
Stopping notrunning: [FAILED]
This happens because the /etc/init.d
scripts use utility scripts in /etc/rc.d/init.d/functions
called success
and failure
. Here's a snippet from /etc/init.d/sshd
in CentOS:
echo -n $"Starting $prog: "
$SSHD $OPTIONS && success || failure
My question is: is there a ubuntu equivalent? I could copy the scripts over, but they're more complicated than you'd think, and why reinvent the wheel if I don't have to?
More From » command-line