In Arch linux, for example, when I'm running my web application on it, I create a systemd service so it'll be supervised and restarted when needed. On FreeBsd systemd isn't installed by default, then, what's the alternative or how am I supposed to do the same thing in FreeBsd?
Asked
Active
Viewed 618 times
1 Answers
1
FreeBSD service management system is called rc
. FreeBSD Handbook has a nice explanation of it.
To make a service for your application you need to write a rc script. You can take openvpn
or many system scripts as example.
As for systemd, there is no way to run it on FreeBSD, as it is too Linux-centric.

arrowd
- 319
- 1
- 8
-
yeah, but what should I add to "rc.conf"? A path to my executable web app file or what? My web application executable file itself isn't a service, it's a normal executable file, whereas everything in rc.conf is a service. – Jodari Aug 22 '17 at 07:40
-
As I said, you need to write a service script for your app. Do `pkg install openvpn` and take a look at `/usr/local/etc/rc.d/openvpn` script. – arrowd Aug 22 '17 at 08:50