2024-01-05 19:12:56 +01:00
|
|
|
diff -Nru webmin-1.710.orig/setup.sh webmin-1.710/setup.sh
|
|
|
|
--- webmin-1.710.orig/setup.sh 2014-09-29 22:48:02.000000000 +0200
|
|
|
|
+++ webmin-1.710/setup.sh 2014-11-03 22:19:46.272952891 +0100
|
|
|
|
@@ -35,17 +35,6 @@
|
2024-01-05 19:12:56 +01:00
|
|
|
echo "systems and common Unix services to be easily administered."
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
-# Only root can run this
|
2024-01-05 19:12:56 +01:00
|
|
|
-id | grep -i "uid=0(" >/dev/null
|
2024-01-05 19:12:56 +01:00
|
|
|
-if [ $? != "0" ]; then
|
|
|
|
- uname -a | grep -i CYGWIN >/dev/null
|
|
|
|
- if [ $? != "0" ]; then
|
|
|
|
- echo "ERROR: The Webmin install script must be run as root";
|
|
|
|
- echo "";
|
|
|
|
- exit 1;
|
|
|
|
- fi
|
|
|
|
-fi
|
|
|
|
-
|
|
|
|
# Use the supplied destination directory, if any
|
|
|
|
if [ "$1" != "" ]; then
|
|
|
|
wadir=$1
|
2024-01-05 19:12:56 +01:00
|
|
|
@@ -363,12 +352,6 @@
|
2024-01-05 19:12:56 +01:00
|
|
|
echo ""
|
|
|
|
exit 12
|
|
|
|
fi
|
|
|
|
- $perl -e 'use Socket; socket(FOO, PF_INET, SOCK_STREAM, getprotobyname("tcp")); setsockopt(FOO, SOL_SOCKET, SO_REUSEADDR, pack("l", 1)); bind(FOO, pack_sockaddr_in($ARGV[0], INADDR_ANY)) || exit(1); exit(0);' $port
|
|
|
|
- if [ $? != "0" ]; then
|
|
|
|
- echo "ERROR: TCP port $port is already in use by another program"
|
|
|
|
- echo ""
|
|
|
|
- exit 13
|
|
|
|
- fi
|
|
|
|
printf "Login name (default admin): "
|
|
|
|
if [ "$login" = "" ]; then
|
|
|
|
read login
|
2024-01-05 19:12:56 +01:00
|
|
|
@@ -747,45 +730,6 @@
|
2024-01-05 19:12:56 +01:00
|
|
|
echo ""
|
|
|
|
fi
|
|
|
|
|
|
|
|
-echo "Changing ownership and permissions .."
|
|
|
|
-# Make all config dirs non-world-readable
|
|
|
|
-for m in $newmods; do
|
|
|
|
- chown -R root $config_dir/$m
|
|
|
|
- chgrp -R bin $config_dir/$m
|
|
|
|
- chmod -R og-rw $config_dir/$m
|
|
|
|
-done
|
|
|
|
-# Make miniserv config files non-world-readable
|
|
|
|
-for f in miniserv.conf miniserv.pem miniserv.users; do
|
|
|
|
- chown -R root $config_dir/$f
|
|
|
|
- chgrp -R bin $config_dir/$f
|
|
|
|
- chmod -R og-rw $config_dir/$f
|
|
|
|
-done
|
|
|
|
-chmod +r $config_dir/version
|
|
|
|
-if [ "$nochown" = "" ]; then
|
|
|
|
- # Make program directory non-world-writable, but executable
|
|
|
|
- chown -R root "$wadir"
|
|
|
|
- chgrp -R bin "$wadir"
|
|
|
|
- chmod -R og-w "$wadir"
|
|
|
|
- chmod -R a+rx "$wadir"
|
|
|
|
-fi
|
|
|
|
-if [ $var_dir != "/var" -a "$upgrading" != 1 ]; then
|
|
|
|
- # Make log directory non-world-readable or writable
|
|
|
|
- chown -R root $var_dir
|
|
|
|
- chgrp -R bin $var_dir
|
|
|
|
- chmod -R og-rwx $var_dir
|
|
|
|
-fi
|
|
|
|
-# Fix up bad permissions from some older installs
|
|
|
|
-for m in ldap-client ldap-server ldap-useradmin mailboxes mysql postgresql servers virtual-server; do
|
|
|
|
- if [ -d "$config_dir/$m" ]; then
|
|
|
|
- chown root $config_dir/$m
|
|
|
|
- chgrp bin $config_dir/$m
|
|
|
|
- chmod og-rw $config_dir/$m
|
|
|
|
- chmod og-rw $config_dir/$m/config 2>/dev/null
|
|
|
|
- fi
|
|
|
|
-done
|
|
|
|
-echo "..done"
|
|
|
|
-echo ""
|
|
|
|
-
|
|
|
|
# Save target directory if one was specified
|
|
|
|
if [ "$wadir" != "$srcdir" ]; then
|
|
|
|
echo $wadir >$config_dir/install-dir
|