diff --git a/README.md b/README.md index 4eb33b18a..c77b0687f 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,31 @@ -## Contents + +

Documentation | FAQ | Security | Screenshots | Forum
](https://webmin.com/download.html)[
](https://webmin.com/devel.html)
-* [Documentation](#documentation)
+* [Installation](#installation)
* [Development](#development)
* [License](#license)
-* [中文版](https://github.com/webmin/webmin/blob/master/README-zh.md)
-
## About
-**Webmin** is a web-based system administration tool for Unix-like servers, and services with over _1,000,000_ installations worldwide. Using it, it is possible to configure operating system internals, such as users, disk quotas, services or configuration files, as well as modify, and control open-source apps, such as BIND DNS Server, Apache HTTP Server, PHP, MySQL, and [many more](https://doxfer.webmin.com/Webmin/Introduction).
+**Webmin** is a web-based system administration tool for Unix-like servers, and services with about _1,000,000_ yearly installations worldwide. Using it, it is possible to configure operating system internals, such as users, disk quotas, services or configuration files, as well as modify, and control open-source apps, such as BIND DNS Server, Apache HTTP Server, PHP, MySQL, and many more.
-[](https://www.youtube.com/watch?v=daYG6O4AsEw)
+
Usability can be expanded by installing modules, which can be custom made. Aside from this, there are two other major projects that extend its functionality:
@@ -26,16 +39,7 @@ Webmin includes _116_ [standard modules](https://doxfer.webmin.com/Webmin/Webmin
Perl 5.10 or higher.
## Installation
-Webmin can be installed in two different ways:
-
- 1. By downloading a pre-built package, available for different distributions (CentOS, Fedora, SuSE, Mandriva, Debian, Ubuntu, Solaris and [other](https://www.webmin.com/support.html)) under [latest release assets](https://github.com/webmin/webmin/releases/latest) or from our [download page](https://webmin.com/download.html);
- Note: It is highly recommended to [add repository](https://doxfer.webmin.com/Webmin/Installation) to your system for having automatic updates.
-
- 2. By downloading, extracting [source file](https://prdownloads.sourceforge.net/webadmin/webmin-2.013.tar.gz), and running [_setup.sh_](https://www.webmin.com/tgz.html) script, with no arguments, which will setup to run it directly from this directory, or with a command-line argument, such as targeted directory.
- Note: If you are installing Webmin [on Windows](https://www.webmin.com/windows.html) system, you must run the command `perl setup.pl` instead. The Windows version depends on several programs, and modules that may not be part of the standard distribution. You will need _process.exe_ command, _sc.exe_ command, and _Win32::Daemon_ Perl module.
-
-## Documentation
-Complete set of documentation for Webmin and all of its modules can be found at out [Wiki page](https://doxfer.webmin.com/Webmin/Main_Page).
+For detailed installation instructions check our guide on [webmin.com/download](https://webmin.com/download) page.
## Development
diff --git a/setup-repos.sh b/setup-repos.sh
index 7d81373b4..bbf0f905b 100755
--- a/setup-repos.sh
+++ b/setup-repos.sh
@@ -50,16 +50,19 @@ if [ -z "$osid" ]; then
echo "${RED}Error:${NORMAL} Failed to detect OS!"
exit 1
fi
-osid=$(echo "$osid" | sed 's/\s.*$//')
+
+# Derivatives precise test
+osid_debian_like=$(echo "$osid" | grep debian)
+osid_rhel_like=$(echo "$osid" | grep rhel)
# Setup OS dependent
-if [ "$osid" = "debian" ]; then
+if [ -n "$osid_debian_like" ]; then
package_type=deb
install_cmd="apt-get install"
install="$install_cmd --quiet --assume-yes"
clean="apt-get clean"
update="apt-get update"
-elif [ "$osid" = "rhel" ]; then
+elif [ -n "$osid_rhel_like" ]; then
package_type=rpm
if command -pv dnf 1>/dev/null 2>&1; then
install_cmd="dnf install"
@@ -70,6 +73,9 @@ elif [ "$osid" = "rhel" ]; then
install="$install_cmd -y"
clean="yum clean all"
fi
+else
+ echo "${RED}Error:${NORMAL} Unknown OS : $osid"
+ exit
fi
# Ask first
@@ -100,7 +106,7 @@ fi
# Check if GPG command is installed
-if [ "$osid" = "debian" ]; then
+if [ -n "$osid_debian_like" ]; then
if [ ! -x /usr/bin/gpg ]; then
$update 1>/dev/null 2>&1
$install gnupg 1>/dev/null 2>&1
@@ -169,12 +175,8 @@ deb)
esac
# Could not setup
-if [ "$?" != "0" ]; then
- echo "${RED}Error:${NORMAL} Could not setup repositories!"
-else
- if [ ! -x "/usr/bin/webmin" ]; then
- echo "Webmin package can now be installed using ${GREEN}${BOLD}${ITALIC}$install_cmd webmin${NORMAL} command."
- fi
+if [ ! -x "/usr/bin/webmin" ]; then
+ echo "Webmin package can now be installed using ${GREEN}${BOLD}${ITALIC}$install_cmd webmin${NORMAL} command."
fi
exit 0
diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl
index 6a90c9623..b51551ea3 100755
--- a/web-lib-funcs.pl
+++ b/web-lib-funcs.pl
@@ -12914,7 +12914,9 @@ eval {
if (!$@ && $locale_system) {
$locale_system =~ s/\..*//;
$locale_system =~ s/_/-/;
- return $locale_system;
+ my $locales = &list_locales();
+ return $locale_system
+ if ($locales->{$locale_system});
}
return $locale_def;
}