Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Jan 2006 22:29:58 -0900
From:      Beech Rintoul <akbeech@gmail.com>
To:        freebsd-questions@freebsd.org
Cc:        Mike Esquardez <mikeala3@hotmail.com>
Subject:   Re: startup script not working
Message-ID:  <200601022230.10387.akbeech@gmail.com>
In-Reply-To: <BAY7-F13E252A65D0DFF9E8E98259A2C0@phx.gbl>
References:  <BAY7-F13E252A65D0DFF9E8E98259A2C0@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart4638830.U5bSh4LUAH
Content-Type: text/plain;
  charset="iso-8859-6"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Monday 02 January 2006 10:14 pm, Mike Esquardez wrote:
> Hello.  I have been reading the docs but i can see what i'm doing wrong.  I
> also was to read this
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-star
>ting-services.html but I am not running a service, just some command that
> need to be run on start up.
>
> I have a shell script that works when i run it as root. I have moved it to
> /usr/local/etc/rc.d and chmod +x but it is not running when the pc starts.
> Is moving file to usr/local/etc/rc.d/ and chmod +x all i have to do?
>
> Any ideas would be great. many thanks to you.
> Mik
>

You should run your script from cron. See man 5 crontab.

Add the following to /etc/crontab

@reboot		root  /path/to/your/script

Beech

---------------------------------------------------------------------------------------
Beech Rintoul - System Administrator - akbeech@gmail.com
/"\   ASCII Ribbon Campaign  | NorthWind Communications
\ / - NO HTML/RTF in e-mail  | 201 East 9th Avenue Ste.310
 X  - NO Word docs in e-mail | Anchorage, AK 99501
/ \  - Please visit Alaska Paradise - http://akparadise.byethost33.com
---------------------------------------------------------------------------------------












--nextPart4638830.U5bSh4LUAH
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQBDuigCVq19LUoGB+MRAt9+AKCz9RT6osw0wWBD3GZtj3qWyDYFZwCgvMeR
BYwm8OZOvI/E86PUXyVDnmg=
=2eTA
-----END PGP SIGNATURE-----

--nextPart4638830.U5bSh4LUAH--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601022230.10387.akbeech>