I made it like this now and seems to work :
#!/bin/sh
#Check solaris version and trim results
solver=`uname -r|cut -d. -f 2`
if [ ${solver} -le 10 ]; then
#Solaris version lower then 10 do this
./etc/init.d/cron restart
else
#Solaris version 10 do this
svcadm restart cron
fi
Hello,
I have a script on solaris 8 that restarts the cron every night.
This is by just doing
/etc/init.d/cron stop
/etc/init.d/cron start
Now i also need to make this script more intelligent to let it check the OS version of solaris.
In case of solaris 10 it needs to do
scvadm cron restart...
Hi,
We are planning to upgrade our solaris 8 machines to solaris 10.
We have one server being nis master running solaris 8. My question. Is Solaris 8 able to nis master a solaris 10 client temporarely, or should i do it the other way around making sure the nis master goes to solaris 10 first?
I...
Hiya!
It has been a while since i was here, but found this forum again. Again got some great tips.
I have a few machines where i want to measure cpu, memory and network load. Ofcourse i dont want to login every 5 minutes to do top or so ;)
I thought about using a snmp agent to do this, but i...
Hi,
I have a script which generates a file every day. This file looks like this 20040123.txt (date).
How do i get my mail command in this way that it always picks todays file?
Regards,
Jeroen
Hi,
I kind of forgot how to delete files older then for example 5days, as im trying to create a script that will delete old log files. I thought it was used with -mtime or something?
thanks.
Hello,
I have like 40 scripts that generates emails to users in our company. The thing is that i want to ask every seperate user who recieves a typical email if he/she still wants to receive this email.
I was thinking if it was possible to add some sort of a signature in sendmail. In this way i...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.