From 6b45fdb91a677b5bef6dcce9bdab95f102cffc74 Mon Sep 17 00:00:00 2001 From: iliajie Date: Thu, 30 Jun 2022 13:37:21 +0300 Subject: [PATCH] Fix to remove pointless alias sub-commands --- bin/server | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/bin/server b/bin/server index 395ad15ab..3d99ef1c4 100755 --- a/bin/server +++ b/bin/server @@ -24,7 +24,7 @@ sub main # If username passed as regular param my $cmd = scalar(@ARGV) == 1 && $ARGV[0]; $cmd = $opt{'command'} if ($opt{'command'}); - if ($cmd !~ /^(status|start|stop|restart|reload|force-restart|force-reload|kill)$/) { + if ($cmd !~ /^(status|start|stop|restart|reload|force-restart|kill)$/) { $cmd = undef; } @@ -72,7 +72,7 @@ sub run my $rs = system("$o->{'config'}/$o->{'cmd'} $service"); exit $rs; } - if ($o->{'cmd'} =~ /^(kill|force-kill)$/) { + if ($o->{'cmd'} =~ /^(kill)$/) { my $rs; if (-x $systemctlcmd) { $rs = system("$systemctlcmd stop $service"); @@ -81,7 +81,7 @@ sub run $rs = system("$o->{'config'}/.stop-init --kill >/dev/null 2>&1 $service"); exit $rs; } - if ($o->{'cmd'} =~ /^(force-reload|force-restart)$/) { + if ($o->{'cmd'} =~ /^(force-restart)$/) { my $rs = system("$o->{'config'}/restart-by-force-kill $service"); exit $rs; } @@ -166,15 +166,10 @@ sub root - start - stop - restart - - reload - force-restart - - force-reload + - reload - kill - Alias commands: - - force-restart | force-reload - - kill | force-kill - =back =head1 LICENSE AND COPYRIGHT