[aklug] Re: (ana)cron & Linux Counter update script

From: David J. Weller-Fahy <dave-lists-aklug@weller-fahy.com>
Date: Sun Oct 31 2010 - 09:01:03 AKDT

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* Jim Gribbin <jimgribbin@gmail.com> [2010-10-31 03:42 -0500]:
> I put a 2 line scrip in /etc/cron-weekly that consists of:
>
> #scrip to update this box on the linux counter project site weekly
> sudo -Hu jimg /home/jimg/.linuxcounter/machine-update -m
>
> at least it seems to work from the command line.
>
> Not have really done any scripts from scratch, do I need the '#!/bin/bash' stuff?

I would run `which sh`, which on my system results in /bin/sh, then
include '#!/bin/sh' as the first line of the file.

Check with the documentation for your cron/anacron system, though, and
see whether it's necessary on yours... if your cron system always runs
the scripts with a particular shell, and you want to use that shell,
then you don't have to specify.

- --
dave [ please don't CC me ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)

iEYEARECAAYFAkzNoM8ACgkQzahokXOb2UxSywCfUFEL0FZUNM7dXwasEgvklhxX
fakAn07x14Ma6TCWfC3eRlQ4Lr0VEjvD
=pAaN
-----END PGP SIGNATURE-----
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sun Oct 31 09:01:14 2010

This archive was generated by hypermail 2.1.8 : Sun Oct 31 2010 - 09:01:15 AKDT