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 --- smeserver-smeadmin-1.6.old/root/etc/e-smith/web/functions/smeadmin 2022-09-18 16:13:34.240000000 -0400 +++ smeserver-smeadmin-1.6/root/etc/e-smith/web/functions/smeadmin 2022-09-18 16:34:30.360000000 -0400 @@ -367,14 +367,14 @@ #liste des services et classification - my @services = ("#".gettext("Web services"),"httpd-e-smith","httpd-admin","squid", + 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", "#".gettext("Administrative services"), "sshd", "smeadmind", "#".gettext("Network services"),"wan","dhcpd","pptpd","ippp","bridge","openvpn-s2s","openvpn-routed","openvpn-bridge","wireguard","ipsec","vpnserver", - "#".gettext("File-sharing services"),"smb","smbd","nmbd","ftp", - "#".gettext("E-mail services"),"pop3","pop3s","dovecot","imaps","imap","qmail","altqmail","qpsmtpd","sqpsmtpd","clamd","freshclam","spamassassin",#mail - "#".gettext("DNS services"),"tinydns","dnscache", #dns + "#".gettext("File-sharing services"),"smb","smbd","nmbd","ftp","nfs","madsonic", + "#".gettext("E-mail services"),"dovecot","pop3","pop3s","imaps","imap","qmail","altqmail","qpsmtpd","sqpsmtpd","clamd","freshclam","spamassassin","mailman",#mail + "#".gettext("DNS services"),"tinydns","dnscache", "dnscache.forwarder", "DynDNS", #dns "#".gettext("Authentication services"),"oidentd","ldap","smtp-auth-proxy","radiusd","cvm-unix", #auth - "#".gettext("Misc. services"),"mariadb","ntpd","lpd", #misc + "#".gettext("Misc. services"),"mariadb","ntpd","lpd", "backuppc", "bandwidthd","unifi", #misc "#".gettext("System services"),"crond","rsyslog","ulogd","acpid","raidmonitor","local", "yum"); #sys et materiel #hack pour la mise en forme : a) debut 1er case a gauche @@ -403,8 +403,7 @@ { #si c'est un service pour lequel on a des infos complementaires... if($svc=~/^(httpd-e-smith|httpd-admin|smb|smbd|nmbd|squid|pptpd|dhcpd|sshd|ftp|pppoe|pppd|wan|altqmail|qmail|qpsmtpd|sqpsmtpd)$/) {$details=1;} - if ( -d "/service/$svc") {$cmd = "/usr/bin/sv s $svc";} # was -d /var/service or -d /service/ - elsif ($svc=~/^(imaps|imap|pop3|pop3s)$/) { $cmd = "/usr/bin/systemctl is-active dovecot"; } + if ($svc=~/^(imaps|imap|pop3|pop3s)$/) { $cmd = "/usr/bin/systemctl is-active dovecot"; } else {$cmd = "/usr/bin/systemctl is-active $svc";} my @res=`$cmd`; @@ -415,18 +414,9 @@ my $dbstatus="not defined"; if ( length(`/sbin/e-smith/db configuration show $svc`) > 1 ) - {$dbstatus=$smedb->get("$svc")->prop('status');} # trouver un moyen de verifier que le nom du service est bien trouvé dans liste + {$dbstatus=$smedb->get("$svc")->prop('status')||"disabled";} # trouver un moyen de verifier que le nom du service est bien trouvé dans liste else {$dbstatus="";} - #print "$svc :".length(`/sbin/e-smith/db configuration show $svc`)."
"; - - #print $q->p($_); - #MATCHE: - #proftpd est arrêté - #/service/pppoe: down 1232017 seconds - #proftpd is stopped - #Warning !! Only on sme6 - #proftpd est arrete if ($svc=~/^(imaps|imap|pop3|pop3s)$/) { @@ -440,7 +430,7 @@ } #si le service est arrete^:il ya down ou il n'y a pas de () pour le pid et ca ne fini pas par ... - elsif(/^down:/ || /^([a-zA-Z0-9]*) [^(^)]*([^.]{3})$/ || /^failed/ || /^unknown/) + elsif(/^down:/ || /^([a-zA-Z0-9]*) [^(^)]*([^.]{3})$/ || /^failed/ || /^unknown/|| /^inactive/) { #on fait une conditionnelle pour savoir si on met le nom du service en lien ou pas print $q->Tr((($details==1)? $q->td($q->a({href=>"$progname?state=service_detail&service=$svc"},"$svc")) : $q->td("$svc")), @@ -795,10 +785,7 @@ { my $cmd=''; - if ($2=~/^(ulogd|smbd|nmbd|rsyslog)$/)#(-d "/service/$2") - {$cmd = `/usr/bin/sv $1 $2`;} - else - {$cmd=`/sbin/e-smith/service $2 $1`;} + $cmd=`/usr/bin/systemctl $1 $2`; my @res=$cmd; foreach (@res) { print $q->p("$_\n");}