Richard Bucker

OpenBSD Freedt

Posted at — Sep 30, 2021

Installing FreeDT on OpenBSD. FreeDT

pkg_add freedt
mkdir -p /service
mkdir -p /service/somejob
vim /service/somejob/run 
chmod +x /service/somejob/run 
rcctl enable svscan
rcctl start svscan

Without one running service it won’t work.

Update

The above documentation is not terrible but it’s a little less than precise.

Starting at the beginning add “service” login class

vi /etc/login.conf

append with the following

service:\
	:nologin=/etc/nologin:\
	:shell=/sbin/nologin:\
	:requirehome=false:\
	:auth=reject:

Then create a user for the service and a user for the service log account.

useradd -d /var/empty -L service oocapp
useradd -d /var/empty -L service ooclog

Then use mkservice. This tool will create the service folder the righ way.

mkdir -p /service
mkservice oocapp ooclog /service/oocapp

Now edit the run files in the service folders and start it up. The run file in the log subfolder could be changed to move the logfile to the /var/log instead of the log folder in the log subfolder.