Re: [Networker] How to duplicate a client from command line? (SOLVED 99.9%)
2006-07-06 10:09:06
hi,
what we do here is to enable/disable the group from a unix cron script
like the following. The cron control 1 full each month and the script
enable the group using nsradmin.
cron line:
00 10 * 6,11 5 /nsr/mrn/bin/foo_biannual.sh active
00 20 * 6,11 6 /nsr/mrn/bin/foo_biannual.sh deactive
script:
Nom=$1
if [ $Nom = "active" ]; then
#special 3sem vend.
# if [ `date +%d` -ge 22 -a `date +%d` -le 28 ]
if [ `date +%d` -ge 15 -a `date +%d` -le 21 ]
then
echo "========================================================"
echo "activation du group XXX"
/usr/sbin/nsradmin -s foo -i /mrn/bin/foo_activ.res
fi; fi
if [ $Nom = "deactive" ]; then
#special 3sem vend.
# if [ `date +%d` -ge 22 -a `date +%d` -le 28 ]
if [ `date +%d` -ge 16 -a `date +%d` -le 22 ]
then
echo "========================================================"
echo "deactivation du group XXX"
/usr/sbin/nsradmin -s foo -i /mrn/bin/foo_deactiv.res
fi; fi
Res files:
print type:NSR group;
name:foo_Serveur
update autostart:Enabled
hope this help.
Alain
To sign off this list, send email to listserv AT listserv.temple DOT edu and
type "signoff networker" in the
body of the email. Please write to networker-request AT listserv.temple DOT edu
if you have any problems
wit this list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER
|
|
|