Start script after reboot

  • Hi,


    I want to start this script after reboot my OMV


    file graph_fix


    #!/bin/sh


    ### BEGIN INIT INFO
    # Provides: Graphic FIX OMV
    # Required-Start: $remote_fs $syslog
    # Required-Stop: $remote_fs $syslog
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: Start daemon at boot time
    # Description: Enable service provided by daemon.
    ### END INIT INFO




    rm -r /var/lib/rrdcached/db/localhost
    rm /var/lib/rrdcached/journal/*
    service collectd restart
    service rrdcached restart


    I have copied my file to /etc/init.d/


    after i linked this file in /etc/rcS.d/ & /etc/rc1.d/ & /etc/rc2.d/


    but it does'nt work


    Thanks

    • Offizieller Beitrag

    after i linked this file in /etc/rcS.d/ & /etc/rc1.d/ & /etc/rc2.d/


    Why would you do that? the symlinks are automatically handled by update-rc.d



    remove those symlinks and run


    update-rc.d scriptname defaults


    Anyway seems like pretty simple script to add it to init. Just add that script to /etc/rc.local and it will get executed at the end of the boot sequence

  • Hi,


    thanks for reply


    i have delete all links in rcS.d rc1.d & rc2.d


    after execute this command #update-rc.d graphic_fix defaults


    i have this message


    update-rc.d: using dependency based boot sequencing


    but it work after reboot.


    thanks

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!