mirror of
https://github.com/webmin/webmin.git
synced 2025-07-21 23:40:34 +00:00
Change default monitor name if it's MariaDB https://github.com/virtualmin/virtualmin-gpl/issues/798
This commit is contained in:
@ -3,3 +3,4 @@ type=apache
|
||||
desc=Apache Webserver
|
||||
depends=apache
|
||||
nosched=0
|
||||
default=1
|
||||
|
@ -2,3 +2,4 @@ id=bind8
|
||||
type=bind8
|
||||
desc=BIND DNS Server
|
||||
depends=bind8
|
||||
default=1
|
||||
|
@ -2,3 +2,4 @@ id=dhcpd
|
||||
type=dhcpd
|
||||
desc=DHCP Server
|
||||
depends=dhcpd
|
||||
default=1
|
||||
|
@ -2,3 +2,4 @@ id=dnsadmin
|
||||
type=dnsadmin
|
||||
desc=BIND 4 DNS Server
|
||||
depends=dnsadmin
|
||||
default=1
|
||||
|
@ -2,3 +2,4 @@ id=inetd
|
||||
type=inetd
|
||||
desc=Internet and RPC Server
|
||||
depends=inetd proc
|
||||
default=1
|
||||
|
@ -2,3 +2,4 @@ id=mysql
|
||||
type=mysql
|
||||
desc=MySQL Database Server
|
||||
depends=mysql
|
||||
default=1
|
||||
|
@ -2,3 +2,4 @@ id=nfs
|
||||
type=nfs
|
||||
desc=NFS Server
|
||||
depends=proc
|
||||
default=1
|
||||
|
@ -2,3 +2,4 @@ id=postfix
|
||||
type=postfix
|
||||
desc=Postfix Server
|
||||
depends=postfix
|
||||
default=1
|
||||
|
@ -3,3 +3,4 @@ type=postgresql
|
||||
desc=PostgreSQL Database Server
|
||||
depends=postgresql
|
||||
nosched=0
|
||||
default=1
|
||||
|
@ -2,3 +2,4 @@ id=qmailadmin
|
||||
type=qmailadmin
|
||||
desc=QMail Server
|
||||
depends=qmailadmin
|
||||
default=1
|
||||
|
@ -2,3 +2,4 @@ id=samba
|
||||
type=samba
|
||||
desc=Samba Servers
|
||||
depends=samba
|
||||
default=1
|
||||
|
@ -2,3 +2,4 @@ id=sendmail
|
||||
type=sendmail
|
||||
desc=Sendmail Server
|
||||
depends=sendmail
|
||||
default=1
|
||||
|
@ -2,3 +2,4 @@ id=squid
|
||||
type=squid
|
||||
desc=Squid Proxy Server
|
||||
depends=squid
|
||||
default=1
|
||||
|
@ -2,3 +2,4 @@ id=xinetd
|
||||
type=xinetd
|
||||
desc=Extended Internet Server
|
||||
depends=xinetd
|
||||
default=1
|
||||
|
@ -57,7 +57,7 @@ if (!-d $services_dir) {
|
||||
# setup initial services
|
||||
mkdir($module_config_directory, 0700);
|
||||
mkdir($services_dir, 0700);
|
||||
system("cp services/* $services_dir");
|
||||
system("cp $module_root_directory/services/* $services_dir");
|
||||
}
|
||||
map { $mod{$_}++ } &list_modules();
|
||||
opendir(DIR, $services_dir);
|
||||
@ -65,6 +65,14 @@ while($f = readdir(DIR)) {
|
||||
next if ($f !~ /^(.*)\.serv$/);
|
||||
my $serv = &get_service($1);
|
||||
next if (!$serv || !$serv->{'type'} || !$serv->{'id'});
|
||||
if ($serv->{'default'} && $serv->{'id'} eq 'mysql' &&
|
||||
&foreign_check("mysql")) {
|
||||
# Fix MySQL / MariaDB
|
||||
&foreign_require("mysql");
|
||||
if ($mysql::mysql_version =~ /mariadb/i) {
|
||||
$serv->{'desc'} =~ s/MySQL/MariaDB/g;
|
||||
}
|
||||
}
|
||||
if ($serv->{'depends'}) {
|
||||
my $d;
|
||||
map { $d++ if (!$mod{$_}) } split(/\s+/, $serv->{'depends'});
|
||||
|
Reference in New Issue
Block a user