Page MenuHomeDevCentral

Provide services for eggdrop
ClosedPublic

Authored by dereckson on Nov 19 2017, 04:36.
Tags
None
Referenced Files
F2823883: D1236.diff
Thu, Apr 18, 03:09
F2823282: D1236.id3188.diff
Thu, Apr 18, 01:31
Unknown Object (File)
Sun, Apr 14, 12:38
Unknown Object (File)
Sun, Apr 14, 11:25
Unknown Object (File)
Sat, Apr 13, 22:45
Unknown Object (File)
Sat, Apr 13, 21:32
Unknown Object (File)
Sat, Apr 13, 03:51
Unknown Object (File)
Fri, Apr 12, 19:03
Subscribers
None

Details

Summary

Compatible only with FreeBSD.

The rc service provided has an instances parameter to write all
the eggdrop names, so a unique service can be used for all of them.
The code is based on the MySQL FreeBSD port instances handling.

service eggdrop status will get an overview of all the eggdrops
in one command. It also allows to run them at reboot or stop it
as once.

Ref T1309

Test Plan
  • service eggdrop status
  • service eggdrop status Wearg
  • TC2 has been launched through /usr/local/etc/rc.d/eggdrop start TC2

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

The daemon command starts the process with / as $HOME instead of /var/run/tc2:

TC2
04:26 <dereckson> .env
04:26 <TC2> RC_PID    10900
04:26 <TC2> HOME      /
04:26 <TC2> LOGNAME   tc2
04:26 <TC2> PWD       /srv/viperserv
04:26 <TC2> GROUP     nasqueron-irc
…
04:26 <TC2> PATH      /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin://bin

That has two impacts:

  • $PATH doesn't include /var/run/tc2/bin ((//bin instead)
  • pid file isn't created at /var/run/tc2/TC2.pid (//TC2.pid instead, a directory without write access)

Set HOME environment variable

The following environment has been defined by the last service update.

HOME is correct, PATH isn't.

01:12 <dereckson> .env
01:12 <TC2> RC_PID    95947
01:12 <TC2> HOME      /var/run/tc2
01:12 <TC2> LOGNAME   tc2
01:12 <TC2> PWD       /srv/viperserv
01:12 <TC2> GROUP     nasqueron-irc
01:12 <TC2> BLOCKSIZE K
01:12 <TC2> VENDOR    amd
01:12 <TC2> HOST      ysul.nasqueron.org
01:12 <TC2> HOSTTYPE  FreeBSD
01:12 <TC2> SHLVL     1
01:12 <TC2> OLDPWD    /
01:12 <TC2> MACHTYPE  x86_64
01:12 <TC2> OSTYPE    FreeBSD
01:12 <TC2> PATH      /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin://bin
01:12 <TC2> TZ        UTC0
01:12 <TC2> USER      tc2
01:12 <TC2> PAGER     more
01:12 <TC2> EDITOR    vi

Manually set /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/$eggdrop_user_home/bin as path.

Set also PATH env variable in addition to HOME

PATH is now correct:

01:00 <TC2> PATH /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/var/run/tc2/bin

This revision is now accepted and ready to land.Nov 22 2017, 01:03
This revision was automatically updated to reflect the committed changes.