This file is indexed.

/usr/sbin/stop-ds-admin is in 389-admin 1.1.46-2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2001 Sun Microsystems, Inc.  Used by permission.
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2
# of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#

# END COPYRIGHT BLOCK
SYSTEMD_ENABLE=0

if [ ${SYSTEMD_ENABLE} -eq 1 ] ; then
    systemctl stop dirsrv-admin.service
else

    PID_FILE=/var/run/dirsrv/admin-serv.pid
    if test -f $PID_FILE ; then
        kill -TERM `cat $PID_FILE`
        if test $? -ne 0 ; then
            exit 1
        fi
    else
        echo server not running
        exit 1
    fi

    loop_counter=1
    max_count=30
    while test $loop_counter -le $max_count; do
        loop_counter=`expr $loop_counter + 1`
        if test -f $PID_FILE ; then
            sleep 2
        else
            exit 0
        fi
    done
    echo server not responding to exit command
    echo killing process group
    kill -9 `cat $PID_FILE`
    rm $PID_FILE

    exit 1

fi