From f73a595d914988c41473ce5bdb0875a70ab43f40 Mon Sep 17 00:00:00 2001 From: iliajie Date: Sat, 2 Jul 2022 23:15:01 +0300 Subject: [PATCH 1/2] Fix key size for `miniserv.pem` --- setup.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.pl b/setup.pl index 6c1589d14..c393a0ac9 100755 --- a/setup.pl +++ b/setup.pl @@ -465,7 +465,7 @@ else { $host = &get_system_hostname(); $cert = &tempname(); $key = &tempname(); - open(SSL, "| openssl req -newkey rsa:512 -x509 -nodes -out $cert -keyout $key -days 1825 >/dev/null 2>&1"); + open(SSL, "| openssl req -newkey rsa:2048 -x509 -nodes -out $cert -keyout $key -days 1825 -sha256 >/dev/null 2>&1"); print SSL ".\n"; print SSL ".\n"; print SSL ".\n"; From af177a69ba107feec3b6d7fd8bb9989c03e81aa4 Mon Sep 17 00:00:00 2001 From: iliajie Date: Sat, 2 Jul 2022 23:31:56 +0300 Subject: [PATCH 2/2] Fix no `/usr/bin/kill` command too --- init/atboot.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init/atboot.pl b/init/atboot.pl index 97d091dc6..02c55ab86 100755 --- a/init/atboot.pl +++ b/init/atboot.pl @@ -125,13 +125,13 @@ elsif ($init_mode eq "systemd") { $product, "$ucproduct server daemon", "$root_directory/miniserv.pl $config_directory/miniserv.conf", - '/usr/bin/kill $MAINPID', + '/bin/kill $MAINPID', undef, { 'pidfile' => "$var_directory/miniserv.pid", 'opts' => { 'env' => '"PERLLIB=' . $root_directory . '"', - 'stop' => '/usr/bin/kill $MAINPID', - 'reload' => '/bin/bash -c \'/usr/bin/kill -HUP $MAINPID && while /usr/bin/kill -0 $MAINPID >/dev/null 2>&1 ; do /bin/sleep 0.5 ; done\'', + 'stop' => '/bin/kill $MAINPID', + 'reload' => '/bin/bash -c \'/bin/kill -HUP $MAINPID && while /bin/kill -0 $MAINPID >/dev/null 2>&1 ; do /bin/sleep 0.5 ; done\'', 'type' => 'forking', 'restart' => 'always', 'restartsec' => '2s',