/[smecontribs]/rpms/smeserver-smeadmin/contribs10/smeserver-smeadmin-1.6-bz11643-services.patch
ViewVC logotype

Contents of /rpms/smeserver-smeadmin/contribs10/smeserver-smeadmin-1.6-bz11643-services.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sun Sep 18 20:38:26 2022 UTC (2 years, 1 month ago) by jpp
Branch: MAIN
CVS Tags: smeserver-smeadmin-1_6-11_el7_sme, smeserver-smeadmin-1_6-9_el7_sme, smeserver-smeadmin-1_6-13_el7_sme, smeserver-smeadmin-1_6-10_el7_sme, smeserver-smeadmin-1_6-12_el7_sme, smeserver-smeadmin-1_6-14_el7_sme, HEAD
Error occurred while calculating annotation data.
* Sun Sep 18 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.6-9.sme
- fix misisng stopped services [SME: 11643]

1 diff -Nur --no-dereference smeserver-smeadmin-1.6.old/root/etc/e-smith/web/functions/smeadmin smeserver-smeadmin-1.6/root/etc/e-smith/web/functions/smeadmin
2 --- smeserver-smeadmin-1.6.old/root/etc/e-smith/web/functions/smeadmin 2022-09-18 16:13:34.240000000 -0400
3 +++ smeserver-smeadmin-1.6/root/etc/e-smith/web/functions/smeadmin 2022-09-18 16:34:30.360000000 -0400
4 @@ -367,14 +367,14 @@
5
6
7 #liste des services et classification
8 - my @services = ("#".gettext("Web services"),"httpd-e-smith","httpd-admin","squid",
9 + my @services = ("#".gettext("Web services"),"httpd-e-smith","httpd-admin","httpd-bkpc","httpd-fpbx","httpd-pki","httpd-isoqlog","squid","php-fpm", "php55-php-fpm", "php56-php-fpm", "php70-php-fpm", "php71-php-fpm", "php72-php-fpm", "php73-php-fpm", "php74-php-fpm", "php80-php-fpm", "php81-php-fpm",
10 "#".gettext("Administrative services"), "sshd", "smeadmind",
11 "#".gettext("Network services"),"wan","dhcpd","pptpd","ippp","bridge","openvpn-s2s","openvpn-routed","openvpn-bridge","wireguard","ipsec","vpnserver",
12 - "#".gettext("File-sharing services"),"smb","smbd","nmbd","ftp",
13 - "#".gettext("E-mail services"),"pop3","pop3s","dovecot","imaps","imap","qmail","altqmail","qpsmtpd","sqpsmtpd","clamd","freshclam","spamassassin",#mail
14 - "#".gettext("DNS services"),"tinydns","dnscache", #dns
15 + "#".gettext("File-sharing services"),"smb","smbd","nmbd","ftp","nfs","madsonic",
16 + "#".gettext("E-mail services"),"dovecot","pop3","pop3s","imaps","imap","qmail","altqmail","qpsmtpd","sqpsmtpd","clamd","freshclam","spamassassin","mailman",#mail
17 + "#".gettext("DNS services"),"tinydns","dnscache", "dnscache.forwarder", "DynDNS", #dns
18 "#".gettext("Authentication services"),"oidentd","ldap","smtp-auth-proxy","radiusd","cvm-unix", #auth
19 - "#".gettext("Misc. services"),"mariadb","ntpd","lpd", #misc
20 + "#".gettext("Misc. services"),"mariadb","ntpd","lpd", "backuppc", "bandwidthd","unifi", #misc
21 "#".gettext("System services"),"crond","rsyslog","ulogd","acpid","raidmonitor","local", "yum"); #sys et materiel
22
23 #hack pour la mise en forme : a) debut 1er case a gauche
24 @@ -403,8 +403,7 @@
25 {
26 #si c'est un service pour lequel on a des infos complementaires...
27 if($svc=~/^(httpd-e-smith|httpd-admin|smb|smbd|nmbd|squid|pptpd|dhcpd|sshd|ftp|pppoe|pppd|wan|altqmail|qmail|qpsmtpd|sqpsmtpd)$/) {$details=1;}
28 - if ( -d "/service/$svc") {$cmd = "/usr/bin/sv s $svc";} # was -d /var/service or -d /service/
29 - elsif ($svc=~/^(imaps|imap|pop3|pop3s)$/) { $cmd = "/usr/bin/systemctl is-active dovecot"; }
30 + if ($svc=~/^(imaps|imap|pop3|pop3s)$/) { $cmd = "/usr/bin/systemctl is-active dovecot"; }
31 else {$cmd = "/usr/bin/systemctl is-active $svc";}
32 my @res=`$cmd`;
33
34 @@ -415,18 +414,9 @@
35 my $dbstatus="not defined";
36
37 if ( length(`/sbin/e-smith/db configuration show $svc`) > 1 )
38 - {$dbstatus=$smedb->get("$svc")->prop('status');} # trouver un moyen de verifier que le nom du service est bien trouvé dans liste
39 + {$dbstatus=$smedb->get("$svc")->prop('status')||"disabled";} # trouver un moyen de verifier que le nom du service est bien trouvé dans liste
40 else
41 {$dbstatus="";}
42 - #print "$svc :".length(`/sbin/e-smith/db configuration show $svc`)."<br>";
43 -
44 - #print $q->p($_);
45 - #MATCHE:
46 - #proftpd est arrêté
47 - #/service/pppoe: down 1232017 seconds
48 - #proftpd is stopped
49 - #Warning !! Only on sme6
50 - #proftpd est arrete
51
52 if ($svc=~/^(imaps|imap|pop3|pop3s)$/)
53 {
54 @@ -440,7 +430,7 @@
55
56 }
57 #si le service est arrete^:il ya down ou il n'y a pas de () pour le pid et ca ne fini pas par ...
58 - elsif(/^down:/ || /^([a-zA-Z0-9]*) [^(^)]*([^.]{3})$/ || /^failed/ || /^unknown/)
59 + elsif(/^down:/ || /^([a-zA-Z0-9]*) [^(^)]*([^.]{3})$/ || /^failed/ || /^unknown/|| /^inactive/)
60 {
61 #on fait une conditionnelle pour savoir si on met le nom du service en lien ou pas
62 print $q->Tr((($details==1)? $q->td($q->a({href=>"$progname?state=service_detail&service=$svc"},"$svc")) : $q->td("$svc")),
63 @@ -795,10 +785,7 @@
64 {
65
66 my $cmd='';
67 - if ($2=~/^(ulogd|smbd|nmbd|rsyslog)$/)#(-d "/service/$2")
68 - {$cmd = `/usr/bin/sv $1 $2`;}
69 - else
70 - {$cmd=`/sbin/e-smith/service $2 $1`;}
71 + $cmd=`/usr/bin/systemctl $1 $2`;
72 my @res=$cmd;
73 foreach (@res)
74 { print $q->p("$_\n");}

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed