mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Use common function to check init script status, rather than looking for a file
This commit is contained in:
@@ -692,8 +692,8 @@ if ($init_mode eq "systemd" && (!-r "$config{'init_dir'}/$action" ||
|
||||
&is_systemd_service($unit))) {
|
||||
# Create systemd unit if missing, as long as this isn't an old-style
|
||||
# init script
|
||||
my $cfile = &get_systemd_root($action)."/".$unit;
|
||||
if (!-r $cfile) {
|
||||
my $st = &action_status($action);
|
||||
if ($st == 0) {
|
||||
# Need to create config
|
||||
$start || &error("Systemd service $action does not exist");
|
||||
&create_systemd_service($unit, $desc, $start, $stop, undef,
|
||||
|
||||
Reference in New Issue
Block a user