mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Use recommended /etc/systemd/system by default
This commit is contained in:
@@ -2400,12 +2400,17 @@ sub get_systemd_root
|
||||
{
|
||||
my ($name) = @_;
|
||||
if ($name) {
|
||||
foreach my $p ("/etc/systemd/system", "/usr/lib/systemd/system",
|
||||
"/lib/systemd/system") {
|
||||
foreach my $p (
|
||||
"/etc/systemd/system",
|
||||
"/usr/lib/systemd/system",
|
||||
"/lib/systemd/system") {
|
||||
if (-r "$p/$name.service" || -r "$p/$name") {
|
||||
return $p;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (-d "/etc/systemd/system") {
|
||||
return "/etc/systemd/system";
|
||||
}
|
||||
if (-d "/usr/lib/systemd/system") {
|
||||
return "/usr/lib/systemd/system";
|
||||
|
||||
Reference in New Issue
Block a user