Re: Automatic start/restart of dsmc/dsmserv - Solaris
1998-06-04 10:25:14
If you use passwordaccess of generate, then you do not need to code the
password, unless you are not defaulting the machine name to the output of
the hostname command. Anyone on the machine can use ps to see the
password, with your method.
> The script I use is:
> -------------------
>
>
> case "$1" in
> 'start')
> if [ -f /usr/bin/dsmc ]
> then
> /usr/bin/dsmc sched >/dev/null 2>&1 &
> /usr/bin/dsmc sched -machine=sun5m -password=sun5m
> >/dev/null 2>
> &1 &
> fi
> ;;
> 'stop')
> PID=`/usr/bin/ps -e -u 0|/usr/bin/fgrep dsmc |/usr/bin/awk
> '{print $1}'`
>
> if [ ! -z "$PID" ] ; then
> /usr/bin/kill ${PID} 1>/dev/null 2>&1
> fi
> ;;
> *)
> echo "Usage: /etc/init.d/adsmsched { start | stop }"
> ;;
> esac
> exit 0
>
Steve (unVMix Systems Programmer/Dude) Roder
(tkssteve AT ubvm.cc.buffalo DOT edu | tkssteve AT acsu.buffalo DOT edu |
(716)645-3564 ,
| http://ubvm.cc.buffalo.edu/~tkssteve)
|
|
|