They do the same thing but enabling a service only works until you reboot.
That is why you add it to /etc/rc.conf with the sysrc command.
To startup a service on boot.
Does service xxx enable survive reboot? No it does not.
I'm responding to this old thread for posterity. A quick test tells me that service <name> enable also writes to /etc/rc.conf.
Code:
% grep webcamd_enable /etc/rc.conf
%
% sudo service webcamd enable
webcamd enabled in /etc/rc.conf
% grep webcamd_enable /etc/rc.conf
webcamd_enable="YES"
A key point is that this enables installed services. That is, service <nonexistent> enable won't write anything to /etc/rc.conf. On the other hand, sysrc is a tool for writing to /etc/rc.conf.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.