wanghc
2023-06-27 2d381e3822a5c2d12632bac45d44deb0b41729cf
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
#!/bin/sh
echo "***************************开始重启************************"
os400=false
case "`uname`" in
OS400*) os400=true;;
esac
 
# resolve links - $0 may be a softlink
PRG="$0"
 
while [ -h "$PRG" ] ; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '/.*' > /dev/null; then
    PRG="$link"
  else
    PRG=`dirname "$PRG"`/"$link"
  fi
done
 
PRGDIR=`dirname "$PRG"`
EXECUTABLE=service.sh
 
# Check that target executable exists
if $os400; then
  # -x will Only work on the os400 if the files are:
  # 1. owned by the user
  # 2. owned by the PRIMARY group of the user
  # this will not work if the user belongs in secondary groups
  eval
else
  if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
    echo "没有找到 $PRGDIR/$EXECUTABLE"
    echo "没有执行权限"
    exit 1
  fi
fi
exec "$PRGDIR"/"$EXECUTABLE" restart "$@"
echo "***************************服务重启************************"