Changeset 1228 for TI12-security


Ignore:
Timestamp:
21/06/06 15:17:43 (13 years ago)
Author:
pjkersha
Message:

Added in header tags for chkconfig. Changed pid setting code to grep on $prog instead of $cmd. Latter doesn't
work if $args is null because grep won't find "$prog " in ps listing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/share/ndgAttAuthority

    r1227 r1228  
    11#!/bin/bash 
    22# 
    3 # /etc/rc.d/init.d/ndgAttAuthority 
    4 # 
    53# SysV init script for NDG Security Attribute Authority 
    64# 
     
    86# 
    97# 13/06/06 
    10 # 
    11 # <tags -- see below for tag definitions. *Every line* from the top 
    12 # of the file to the end of the tags section must begin with a # 
    13 # character. After the tags section, there should be a blank line. 
    14 # This keeps normal comments in the rest of the file from being 
    15 # mistaken for tags, should they happen to fit the pattern.> 
    168# 
    179# Copyright (C) 2006 CCLRC & NERC 
     
    1911# This software may be distributed under the terms of the Q Public License, 
    2012# version 1.0 or later. 
     13# 
     14# chkconfig: 2345 99 01 
     15# description: NERC Data Grid Security Attribute Authority Web Service 
     16# 
    2117 
    2218# Edit these variables as required 
     
    7672    if [ $RETVAL = 0 ]; then 
    7773                # Get the process ID 
    78                 pid=(`ps --no-headers -u ${user} -o pid,cmd --sort=-pid|grep "$cmd"`) 
     74                pid=(`ps --no-headers -u ${user} -o pid,cmd --sort=-pid|grep "$prog"`) 
    7975                echo ${pid} > /var/run/${serviceName}.pid 
    8076        touch /var/lock/subsys/${serviceName}            
Note: See TracChangeset for help on using the changeset viewer.