📖 ~1 min read
Table of contents
Symptom & Impact
Application is down after reboot until started manually.
Environment & Reproduction
Custom script in `/usr/local/etc/rc.d/` works manually but not during startup.
Root Cause Analysis
Missing `PROVIDE/REQUIRE` headers, executable bit, or `*_enable=YES` value.
Quick Triage
Check script metadata and enable flag.
head -n 30 /usr/local/etc/rc.d/myapp
sysrc myapp_enable
service myapp onestatus
Step-by-Step Diagnosis
Validate rcorder position and shell syntax.
rcorder /etc/rc.d/* /usr/local/etc/rc.d/* | grep myapp
sh -n /usr/local/etc/rc.d/myapp
service myapp rcvar

Solution – Primary Fix
Add correct headers, set executable bit, and enable via `sysrc`.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
chmod +x /usr/local/etc/rc.d/myapp
sysrc myapp_enable='YES'
service myapp start

Solution – Alternative Approaches
Wrap app with daemon supervisor if startup dependencies are complex.
Verification & Acceptance Criteria
Service starts automatically after reboot and remains healthy.
Rollback Plan
Disable script in `rc.conf` and use manual start while script is corrected.
Prevention & Hardening
Template rc.d scripts and enforce static checks in deployment pipeline.
Related Errors & Cross-Refs
`myapp_enable is not set properly`, missing process after boot, rcorder omissions.
Related tutorial: View the step-by-step tutorial for freebsd-12.
View all freebsd-12 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
`rc.subr(8)`, `rc.conf(5)`, FreeBSD service framework docs.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.