creating a startup script for a foreign application
freebsd at edvax.de
Sat Aug 22 07:58:52 UTC 2020
On Sat, 22 Aug 2020 10:10:46 +0300, Odhiambo Washington wrote:
> Hi good people,
> I am looking for assistance in creating a startup script for rc.d/ to
> automatically start/stop a service upon reboot.
> I have installed Mailman3.x in a python virtual environment and I have
> adopted a script from Linux to control it.
> I am able to use the script to manually start|stop the application.
> However, it does not work when I reboot the system.
> Hoping someone can help me tinker with it so that it works with system
Without having had a closer look, I can immediately see
that it is missing the header typical for all rc.d/ scripts,
and it declares requiring bash, while I don't see anything
bash-specific, so sh should be sufficient. For the general
structure, you could examine scripts in /etc/rc.d/ (system
scripts) and /usr/local/etc/rc.d/ (3rd party scripts). The
REQUIRE: comment should probably contain "DAEMON" and "netif".
Everything else looks quite "Linux-like" and does not really
compare to the FreeBSD equivalents of rc.d/ style scripts,
which first source /etc/rc.subr, sets a few variables, and
then declares functions. You can adapt most of the content
of the Linux-like version to conform to those requirements.
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions