mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
system/webmin: Fix script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
a4cd3b4dce
commit
fb70acbb64
7 changed files with 46 additions and 3 deletions
|
@ -22,6 +22,5 @@ preserve_perms() {
|
|||
config $NEW
|
||||
}
|
||||
|
||||
# Signal the startup script to do some post install configuration
|
||||
# Signal the startup script to do some post install configuration
|
||||
touch etc/webmin/FIRSTRUN
|
||||
|
||||
|
|
4
system/webmin/reload.new
Normal file
4
system/webmin/reload.new
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
echo Reloading Webmin server in /usr/libexec/webmin
|
||||
pidfile=`grep "^pidfile=" /etc/webmin/miniserv.conf | sed -e 's/pidfile=//g'`
|
||||
kill -USR1 `cat $pidfile`
|
3
system/webmin/restart-by-force-kill.new
Normal file
3
system/webmin/restart-by-force-kill.new
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
/etc/webmin/stop --kill
|
||||
/etc/webmin/start
|
3
system/webmin/restart.new
Normal file
3
system/webmin/restart.new
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
/etc/webmin/stop
|
||||
/etc/webmin/start
|
10
system/webmin/start.new
Normal file
10
system/webmin/start.new
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
echo Starting Webmin server in /usr/libexec/webmin
|
||||
trap '' 1
|
||||
LANG=
|
||||
export LANG
|
||||
unset PERLIO
|
||||
export PERLIO
|
||||
PERLLIB=/usr/libexec/webmin
|
||||
export PERLLIB
|
||||
exec '/usr/libexec/webmin/miniserv.pl' $* /etc/webmin/miniserv.conf
|
21
system/webmin/stop.new
Normal file
21
system/webmin/stop.new
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
if [ "$1" = "--kill" ]; then
|
||||
echo Force stopping Webmin server in /usr/libexec/webmin
|
||||
else
|
||||
echo Stopping Webmin server in /usr/libexec/webmin
|
||||
fi
|
||||
pidfile=`grep "^pidfile=" /etc/webmin/miniserv.conf | sed -e 's/pidfile=//g'`
|
||||
pid=`cat $pidfile 2>/dev/null`
|
||||
if [ "$pid" != "" ]; then
|
||||
kill $pid || exit 1
|
||||
touch /var/log/webmin/stop-flag
|
||||
if [ "$1" = "--kill" ]; then
|
||||
sleep 1
|
||||
((ps axf | grep "/usr/libexec/webmin\/miniserv\.pl" | awk '{print "kill -9 -- -" $1}' | bash) || kill -9 -- -$pid || kill -9 $pid) 2>/dev/null
|
||||
fi
|
||||
exit 0
|
||||
else
|
||||
if [ "$1" = "--kill" ]; then
|
||||
(ps axf | grep "/usr/libexec/webmin\/miniserv\.pl" | awk '{print "kill -9 -- -" $1}' | bash) 2>/dev/null
|
||||
fi
|
||||
fi
|
|
@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
|
|||
|
||||
PRGNAM=webmin
|
||||
VERSION=${VERSION:-2.013}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
|
@ -138,6 +138,9 @@ if [ -e $PKG/etc ]; then
|
|||
get_config_files $PKG/etc
|
||||
fi
|
||||
|
||||
rm -f $PKG/etc/webmin/{reload.new,.reload-init,restart-by-force-kill.new,.restart-by-force-kill-init,restart.new,.restart-init,start.new,.start-init,stop.new,.stop-init}
|
||||
install -m 0755 $CWD/*.new $PKG/etc/webmin
|
||||
|
||||
# Fix a few ownership issues
|
||||
chown -R root:root $PKG/etc $PKG/var
|
||||
|
||||
|
|
Loading…
Reference in a new issue