在自定义 tomcat 成系统服务时候出现了问题,
```
sudo service tomcat-ad status
● tomcat-ad.service - Ad Service
Loaded: loaded (/etc/systemd/system/tomcat-ad.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-01-07 15:27:00 CST; 1s ago
Process: 23931 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=0/SUCCESS)
Process: 23991 ExecStart=/home/hadoop/ad-server/apache-tomcat-7.0.82/bin/
startup.sh (code=exited, status=0/SUCCESS)
Main PID: 24000 (java)
Tasks: 28
Memory: 375.8M
CPU: 4.753s
CGroup: /system.slice/tomcat-ad.service
└─24000 /usr/java/jdk1.8.0_151/bin/java -Djava.util.logging.config.file=/home/hadoop/ad-server/apache-tomcat-7.0.82/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Jan 07 15:27:00 node3 systemd[1]: Starting Ad Service...
Jan 07 15:27:00 node3
startup.sh[23991]: Tomcat started.
Jan 07 15:27:00 node3 systemd[1]: Started Ad Service.
```
status 查看是 active 但是我 stop 时候时候显示是 failed
```
tomcat-ad.service - Ad Service
Loaded: loaded (/etc/systemd/system/tomcat-ad.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-01-07 15:26:48 CST; 3s ago
Process: 23931 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=0/SUCCESS)
Process: 23826 ExecStart=/home/hadoop/ad-server/apache-tomcat-7.0.82/bin/
startup.sh (code=exited, status=0/SUCCESS)
Main PID: 23835 (code=exited, status=143)
Jan 07 15:25:59 node3 systemd[1]: Starting Ad Service...
Jan 07 15:25:59 node3
startup.sh[23826]: Tomcat started.
Jan 07 15:25:59 node3 systemd[1]: Started Ad Service.
Jan 07 15:26:47 node3 systemd[1]: Stopping Ad Service...
Jan 07 15:26:48 node3 systemd[1]: tomcat-ad.service: Main process exited, code=exited, status=143/n/a
Jan 07 15:26:48 node3 systemd[1]: Stopped Ad Service.
Jan 07 15:26:48 node3 systemd[1]: tomcat-ad.service: Unit entered failed state.
Jan 07 15:26:48 node3 systemd[1]: tomcat-ad.service: Failed with result 'exit-code'.
```
为什么是 return status 143 呢?