How to run custom service on boot?



  • Hello,

    I've created a new "service" called xaccess (0555) in /etc/rc.d:

    #!/bin/sh
    #
    # $FreeBSD$
    #
    
    # PROVIDE: xaccess
    # REQUIRE: networking FILESYSTEMS
    
    . /etc/rc.subr
    
    name="xaccess"
    rcvar="xaccess_enable"
    command="/root/xaccess/${name}"
    pidfile="/var/run/${name}.pid"
    load_rc_config $name
    run_rc_command "$1"
    
    

    Everything is working as expected: I can start/stop/restart it. But it does not start on boot!

    I've tried to add xaccess_enable="YES" to /etc/rc.conf and /etc/defaults/rc.conf and /etc/rc.conf.local. The service still is not active after boot.

    P.S: Service itself binds on 0.0.0.0 on start.



  • You could try the Shell cmd package from gui


Log in to reply