If you have a certain program that needs to be launched as a service in the FreeBSD, follow these steps:
1. Create and edit a configuration file for your service
"ee /etc/rc.d/myapp".
Below is an example of a simple launch of an application called "myapp" using the "start" command and killing the process using the "stop" command.
2. Add execution rights to this configuration file:
"chmod +x /etc/rc.d/myapp".
3. Next, in the file "/etc/rc.conf" you need to add permission to start the service with the command "echo myapp_enable="YES" >> /etc/rc.conf". Also in this case, your application will always start when the OS boots.
No comments:
Post a Comment