Close Menu
    Facebook X (Twitter) Instagram
    Command Linux
    • About
    • How to
      • Q&A
    • OS
      • Windows
      • Arch Linux
    • AI
    • Gaming
      • Easter Eggs
    • Statistics
    • Blog
      • Featured
    • MORE
      • IP Address
      • Man Pages
    • Write For Us
    • Contact
    Command Linux
    Home - man page - INIT-D-SCRIPT

    INIT-D-SCRIPT

    WillieBy WillieApril 21, 2026Updated:April 21, 2026No Comments2 Mins Read
     

    NAME

    init-d-script – interpreter for short and simple init.d scripts.  

    DESCRIPTION

    Generic init.d script framework to reduce the redundant code in /etc/init.d/. The goal is to create an init.d script that is Debian and LSB compliant. When the Debian policy conflict with the LSB, the Debian policy take preference. See The LSB specification <http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html> for information about init.d scripts in the LSB.

    This is a simple example on how init-d-script can be used to start and stop a daemon with PID file support:

    #!/lib/init/init-d-script
    ### BEGIN INIT INFO
    # Provides:          atd
    # Required-Start:    $syslog $time $remote_fs
    # Required-Stop:     $syslog $time $remote_fs
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: run at jobs
    # Description:       Debian init script to start the daemon
    #                    running at jobs.
    ### END INIT INFO
    DAEMON=/usr/sbin/atd
    
    

    In addition to the DAEMON setting, one can specify DESC, NAME, PIDFILE (none means no PID file), or implement override functions do_force_reload_override, do_reload_override, do_restart_override, do_start_override, do_start_cmd_override, do_start_prepare, do_start_cleanup do_status_override, do_stop_override, do_stop_prepare, do_stop_cleanup and do_stop_cmd_override.

    If the daemon support reloading, implement the do_reload function to make the init.d script recognize the reload operation as well as use it for the force-reload operation.

    If DAEMON is ‘none’, the check to see if the daemon is installed is disabled, and replacement functions do_start_cmd_override, do_stop_cmd_override and do_status_override functions must be implemented.

    Services supporting reload should define the do_reload function. If the service handle reload using a SIGUSR1 signal, the following alias can be used instead of implementing ones own do_reload function:

    alias do_reload=do_reload_sigusr1
    
    

     

    FILES

    /lib/init/init-d-script
    Bourne shell interpreter with implementation of init.d actions /etc/init.d/ Location of init.d scripts.
     

    KNOWN BUGS/LIMITATIONS

    Not yet documented  
    Willie
    • Website

    Willie has over 15 years of experience in Linux system administration and DevOps. After managing infrastructure for startups and enterprises alike, he founded Command Linux to share the practical knowledge he wished he had when starting out. He oversees content strategy and contributes guides on server management, automation, and security.

    Related Posts

    XMAG

    April 30, 2026

    GIT-SUBTREE

    April 30, 2026

    XARGS

    April 30, 2026

    EPOLL_WAIT

    April 30, 2026
    Top Posts

    ARC4RANDOM

    February 3, 2026

    How to Use chmod Executable in Linux

    January 27, 2026

    php

    March 27, 2026

    How to Add to PATH Linux

    January 2, 2026
    • Home
    • Contact Us
    • Privacy Policy
    • Terms of Use

    Type above and press Enter to search. Press Esc to cancel.