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
|
desc=Apache Webserver
|
||||||
depends=apache
|
depends=apache
|
||||||
nosched=0
|
nosched=0
|
||||||
|
default=1
|
||||||
|
@ -2,3 +2,4 @@ id=bind8
|
|||||||
type=bind8
|
type=bind8
|
||||||
desc=BIND DNS Server
|
desc=BIND DNS Server
|
||||||
depends=bind8
|
depends=bind8
|
||||||
|
default=1
|
||||||
|
@ -2,3 +2,4 @@ id=dhcpd
|
|||||||
type=dhcpd
|
type=dhcpd
|
||||||
desc=DHCP Server
|
desc=DHCP Server
|
||||||
depends=dhcpd
|
depends=dhcpd
|
||||||
|
default=1
|
||||||
|
@ -2,3 +2,4 @@ id=dnsadmin
|
|||||||
type=dnsadmin
|
type=dnsadmin
|
||||||
desc=BIND 4 DNS Server
|
desc=BIND 4 DNS Server
|
||||||
depends=dnsadmin
|
depends=dnsadmin
|
||||||
|
default=1
|
||||||
|
@ -2,3 +2,4 @@ id=inetd
|
|||||||
type=inetd
|
type=inetd
|
||||||
desc=Internet and RPC Server
|
desc=Internet and RPC Server
|
||||||
depends=inetd proc
|
depends=inetd proc
|
||||||
|
default=1
|
||||||
|
@ -2,3 +2,4 @@ id=mysql
|
|||||||
type=mysql
|
type=mysql
|
||||||
desc=MySQL Database Server
|
desc=MySQL Database Server
|
||||||
depends=mysql
|
depends=mysql
|
||||||
|
default=1
|
||||||
|
@ -2,3 +2,4 @@ id=nfs
|
|||||||
type=nfs
|
type=nfs
|
||||||
desc=NFS Server
|
desc=NFS Server
|
||||||
depends=proc
|
depends=proc
|
||||||
|
default=1
|
||||||
|
@ -2,3 +2,4 @@ id=postfix
|
|||||||
type=postfix
|
type=postfix
|
||||||
desc=Postfix Server
|
desc=Postfix Server
|
||||||
depends=postfix
|
depends=postfix
|
||||||
|
default=1
|
||||||
|
@ -3,3 +3,4 @@ type=postgresql
|
|||||||
desc=PostgreSQL Database Server
|
desc=PostgreSQL Database Server
|
||||||
depends=postgresql
|
depends=postgresql
|
||||||
nosched=0
|
nosched=0
|
||||||
|
default=1
|
||||||
|
@ -2,3 +2,4 @@ id=qmailadmin
|
|||||||
type=qmailadmin
|
type=qmailadmin
|
||||||
desc=QMail Server
|
desc=QMail Server
|
||||||
depends=qmailadmin
|
depends=qmailadmin
|
||||||
|
default=1
|
||||||
|
@ -2,3 +2,4 @@ id=samba
|
|||||||
type=samba
|
type=samba
|
||||||
desc=Samba Servers
|
desc=Samba Servers
|
||||||
depends=samba
|
depends=samba
|
||||||
|
default=1
|
||||||
|
@ -2,3 +2,4 @@ id=sendmail
|
|||||||
type=sendmail
|
type=sendmail
|
||||||
desc=Sendmail Server
|
desc=Sendmail Server
|
||||||
depends=sendmail
|
depends=sendmail
|
||||||
|
default=1
|
||||||
|
@ -2,3 +2,4 @@ id=squid
|
|||||||
type=squid
|
type=squid
|
||||||
desc=Squid Proxy Server
|
desc=Squid Proxy Server
|
||||||
depends=squid
|
depends=squid
|
||||||
|
default=1
|
||||||
|
@ -2,3 +2,4 @@ id=xinetd
|
|||||||
type=xinetd
|
type=xinetd
|
||||||
desc=Extended Internet Server
|
desc=Extended Internet Server
|
||||||
depends=xinetd
|
depends=xinetd
|
||||||
|
default=1
|
||||||
|
@ -57,7 +57,7 @@ if (!-d $services_dir) {
|
|||||||
# setup initial services
|
# setup initial services
|
||||||
mkdir($module_config_directory, 0700);
|
mkdir($module_config_directory, 0700);
|
||||||
mkdir($services_dir, 0700);
|
mkdir($services_dir, 0700);
|
||||||
system("cp services/* $services_dir");
|
system("cp $module_root_directory/services/* $services_dir");
|
||||||
}
|
}
|
||||||
map { $mod{$_}++ } &list_modules();
|
map { $mod{$_}++ } &list_modules();
|
||||||
opendir(DIR, $services_dir);
|
opendir(DIR, $services_dir);
|
||||||
@ -65,6 +65,14 @@ while($f = readdir(DIR)) {
|
|||||||
next if ($f !~ /^(.*)\.serv$/);
|
next if ($f !~ /^(.*)\.serv$/);
|
||||||
my $serv = &get_service($1);
|
my $serv = &get_service($1);
|
||||||
next if (!$serv || !$serv->{'type'} || !$serv->{'id'});
|
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'}) {
|
if ($serv->{'depends'}) {
|
||||||
my $d;
|
my $d;
|
||||||
map { $d++ if (!$mod{$_}) } split(/\s+/, $serv->{'depends'});
|
map { $d++ if (!$mod{$_}) } split(/\s+/, $serv->{'depends'});
|
||||||
|
Reference in New Issue
Block a user