Also use the new stop flag to shut down cleanly on CentOS 8

This commit is contained in:
Jamie Cameron
2020-07-25 17:44:20 -07:00
parent a257f33031
commit 591fbe8656

View File

@@ -620,8 +620,9 @@ echo "pidfile=\`grep \"^pidfile=\" $config_dir/miniserv.conf | sed -e 's/pidfile
echo "pid=\`cat \$pidfile\`" >>$config_dir/stop
echo "if [ \"\$pid\" != \"\" ]; then" >>$config_dir/stop
echo " kill \$pid || exit 1" >>$config_dir/stop
echo " touch $var_dir/stop-flag" >>$config_dir/stop
echo " if [ \"\$1\" = \"--kill\" ]; then" >>$config_dir/stop
echo " sleep 1" >>$config_dir/stop
echo " sleep 2" >>$config_dir/stop
echo " (kill -9 -- -\$pid || kill -9 \$pid) 2>/dev/null" >>$config_dir/stop
echo " fi" >>$config_dir/stop
echo " exit 0" >>$config_dir/stop