From e51ff183965b754d36af133a02f16f1fb976d9f7 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 23 Apr 2022 12:34:18 -0700 Subject: [PATCH] Remove special-case replacement of stop script to fix an old bug --- makedebian.pl | 21 --------------------- makerpm.pl | 20 -------------------- 2 files changed, 41 deletions(-) diff --git a/makedebian.pl b/makedebian.pl index 278b317ac..a25adeaad 100755 --- a/makedebian.pl +++ b/makedebian.pl @@ -264,27 +264,6 @@ system("chmod 755 $preinstall_file"); open(SCRIPT, ">$postinstall_file"); print SCRIPT </etc/webmin/stop 2>/dev/null <<'EOD' -#!/bin/sh -echo Stopping Webmin server in /usr/libexec/webmin -pidfile=`grep "^pidfile=" /etc/webmin/miniserv.conf | sed -e 's/pidfile=//g'` -pid=`cat \$pidfile` -if [ "\$pid" != "" ]; then - kill \$pid || exit 1 - if [ "\$1" = "--kill" ]; then - sleep 1 - (kill -9 -- -\$pid || kill -9 \$pid) 2>/dev/null - fi - exit 0 -else - exit 1 -fi -EOD -fi - inetd=`grep "^inetd=" /etc/$baseproduct/miniserv.conf 2>/dev/null | sed -e 's/inetd=//g'` if [ "\$1" = "upgrade" -a "\$1" != "abort-upgrade" ]; then # Upgrading the package, so stop the old webmin properly diff --git a/makerpm.pl b/makerpm.pl index 4234e4bb8..76d74c257 100755 --- a/makerpm.pl +++ b/makerpm.pl @@ -192,26 +192,6 @@ fi inetd=`grep "^inetd=" /etc/webmin/miniserv.conf 2>/dev/null | sed -e 's/inetd=//g'` startafter=0 -# Fix old versions of Webmin that might kill the UI process on upgrade -if [ -d /etc/webmin ]; then - cat >/etc/webmin/stop 2>/dev/null <<'EOD' -#!/bin/sh -echo Stopping Webmin server in /usr/libexec/webmin -pidfile=`grep "^pidfile=" /etc/webmin/miniserv.conf | sed -e 's/pidfile=//g'` -pid=`cat \$pidfile` -if [ "\$pid" != "" ]; then - kill \$pid || exit 1 - if [ "\$1" = "--kill" ]; then - sleep 1 - (kill -9 -- -\$pid || kill -9 \$pid) 2>/dev/null - fi - exit 0 -else - exit 1 -fi -EOD -fi - if [ "\$1" != 1 ]; then # Upgrading the RPM, so stop the old webmin properly if [ "\$inetd" != "1" ]; then