Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
openrc-run
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
mrbrklyn
n00b
n00b


Joined: 05 Oct 2017
Posts: 8

PostPosted: Thu Oct 05, 2017 2:28 am    Post subject: openrc-run Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Thu Oct 05, 2017 3:13 am    Post subject: Reply with quote

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
View user's profile Send private message
mrbrklyn
n00b
n00b


Joined: 05 Oct 2017
Posts: 8

PostPosted: Thu Oct 05, 2017 3:52 am    Post subject: Reply with quote

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
View user's profile Send private message
mrbrklyn
n00b
n00b


Joined: 05 Oct 2017
Posts: 8

PostPosted: Thu Oct 05, 2017 3:56 am    Post subject: Reply with quote

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
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Thu Oct 05, 2017 10:10 am    Post subject: Reply with quote

open-run is openrc, and here's a link for writing initscripts
https://wiki.gentoo.org/wiki/Handbook:AMD64/Working/Initscripts#Writing_initscripts

I don't know who made this mailman.rc but i must say, it really looks dirty.

and start-stop-deamon documentation could be get from man
Back to top
View user's profile Send private message
mrbrklyn
n00b
n00b


Joined: 05 Oct 2017
Posts: 8

PostPosted: Sat Oct 07, 2017 9:58 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum