View previous topic :: View next topic |
Author |
Message |
mrbrklyn n00b
Joined: 05 Oct 2017 Posts: 8
|
Posted: Thu Oct 05, 2017 2:28 am Post subject: openrc-run |
|
|
I'm not understanding out the status option is working for open-run. I have been tasked to write an init script for openrc for mailman and it always comes up with a status of crashed. I don't find enough information in the docs to debug this and the trace from the debug is not pointing anything to be obvious. It does start and stop correctly.
There are a few aspect of it that might be causing trouble. The start up program kicks off a master-runner program that controls the rest of the applications. There is no inherent status in mailmanctl. I wrote a script to work around it but I'm not satisfied. It just checks to see if the active PID is up and running. No use of cgroups or knowledge of crashes.
Ruben |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Thu Oct 05, 2017 3:13 am Post subject: |
|
|
There appears to be one provided. Is it not helpful as a reference?
Code: | $ grep -B6 rc-update /usr/portage/net-mail/mailman/files/README.gentoo-r3
6) Start the mailman daemon:
/etc/init.d/mailman start
and add it to default runlevel (optional but recommended):
rc-update add mailman default |
_________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
mrbrklyn n00b
Joined: 05 Oct 2017 Posts: 8
|
Posted: Thu Oct 05, 2017 3:52 am Post subject: |
|
|
pjp wrote: | There appears to be one provided. Is it not helpful as a reference?
Code: | $ grep -B6 rc-update /usr/portage/net-mail/mailman/files/README.gentoo-r3
6) Start the mailman daemon:
/etc/init.d/mailman start
and add it to default runlevel (optional but recommended):
rc-update add mailman default |
|
I can't find that. I also, still want to understand how opern-run works, which is a problem. The system is highly dependent on it. |
|
Back to top |
|
|
mrbrklyn n00b
Joined: 05 Oct 2017 Posts: 8
|
Posted: Thu Oct 05, 2017 3:56 am Post subject: |
|
|
mrbrklyn wrote: | pjp wrote: | There appears to be one provided. Is it not helpful as a reference?
Code: | $ grep -B6 rc-update /usr/portage/net-mail/mailman/files/README.gentoo-r3
6) Start the mailman daemon:
/etc/init.d/mailman start
and add it to default runlevel (optional but recommended):
rc-update add mailman default |
|
I can't find that. I also, still want to understand how opern-run works, which is a problem. The system is highly dependent on it. |
https://gitweb.gentoo.org/repo/gentoo.git/plain/net-mail/mailman/files/mailman.rc
Code: | #!/sbin/openrc-run
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
need net
use logger
}
start() {
ebegin "Starting mailman"
su - mailman -c 'bin/mailmanctl -s start' >/dev/null 2>&1
eend $?
}
stop() {
ebegin "Stopping mailman"
su - mailman -c 'bin/mailmanctl stop' >/dev/null 2>&1
eend $?
}
svc_restart() {
ebegin "Restarting mailman"
su - mailman -c 'bin/mailmanctl restart' >/dev/null 2>&1
eend $?
}
|
this doesn't use the start-stop-daemon either ..
[Moderator edit: added [code] tags to preserve output layout. -Hu] |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
|
Back to top |
|
|
mrbrklyn n00b
Joined: 05 Oct 2017 Posts: 8
|
Posted: Sat Oct 07, 2017 9:58 am Post subject: |
|
|
I wrote and it is dirty because because I'm blindly hacking without solid docs. I really don't understand exactly what the start-stop-daemon does. It constantly surprises me. Somewhere it should be looking at and tracking cgroups. The info available seems minimal. am learning by doing at this point. |
|
Back to top |
|
|
|