source: trunk/third/xntp/scripts/xntp @ 10832

Revision 10832, 513 bytes checked in by brlewis, 27 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r10831, which included commits to RCS files with non-trunk default branches.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2
3killproc() {    # kill named processes
4        pid=`/usr/bin/ps -e |
5                /usr/bin/grep $1 |
6                /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`
7        [ "$pid" != "" ] && kill $pid
8}
9
10case "$1" in
11'start')
12        ps -e | grep xntpd > /dev/null 2>&1
13        if [ $? -eq 0 ]
14        then
15                echo "ntp daemon already running. ntp start aborted"
16                exit 0
17        fi
18        if [ -f /etc/inet/ntp.conf -a -x /usr/sbin/xntpd ]
19        then
20                /usr/sbin/xntpd -c /etc/inet/ntp.conf
21        fi
22        ;;
23'stop')
24        killproc xntpd
25        ;;
26*)
27        echo "Usage: /etc/init.d/xntp { start | stop }"
28        ;;
29esac
Note: See TracBrowser for help on using the repository browser.