Results 1 to 2 of 2

Thread: First time scripting, running script as root on startup.

  1. #1
    Join Date
    Jul 2010
    Beans
    4

    Thumbs down First time scripting, running script as root on startup.

    I am trying to run my script at startup but it doesn't run the script as root.

    Do I need to add my root username and password in the script, or somewhere else?

    Thanks, let me know if you need more info I get back asap.
    Last edited by jesuscamp; July 30th, 2010 at 01:47 AM.

  2. #2
    Join Date
    Nov 2009
    Beans
    83
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: First time scripting, running script as root on startup.

    couple of methods of doing this.

    You could add your script to the /etc/init.d/ and then enable it with update-rc.d

    or

    You could add it to root's crontab with the @reboot directive.



    Either method will run the script with root's credentials.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •