Redirect to /dev/null has to be inside the backquotes

This commit is contained in:
Jamie Cameron
2022-08-07 11:03:30 -07:00
parent 4b74eddc3c
commit dca68489bd
2 changed files with 2 additions and 2 deletions

View File

@@ -591,7 +591,7 @@ else {
print STOP " echo Stopping Webmin server in $wadir\n";
print STOP "fi\n";
print STOP "pidfile=\`grep \"^pidfile=\" $config_directory/miniserv.conf | sed -e 's/pidfile=//g'\`\n";
print STOP "pid=\`cat \$pidfile\` 2>/dev/null\n";
print STOP "pid=\`cat \$pidfile 2>/dev/null\`\n";
print STOP "if [ \"\$pid\" != \"\" ]; then\n";
print STOP " kill \$pid || exit 1\n";
print STOP " touch $var_dir/stop-flag\n";

View File

@@ -647,7 +647,7 @@ echo "else" >>$config_dir/.stop-init
echo " echo Stopping Webmin server in $wadir" >>$config_dir/.stop-init
echo "fi" >>$config_dir/.stop-init
echo "pidfile=\`grep \"^pidfile=\" $config_dir/miniserv.conf | sed -e 's/pidfile=//g'\`" >>$config_dir/.stop-init
echo "pid=\`cat \$pidfile\` 2>/dev/null" >>$config_dir/.stop-init
echo "pid=\`cat \$pidfile 2>/dev/null\`" >>$config_dir/.stop-init
echo "if [ \"\$pid\" != \"\" ]; then" >>$config_dir/.stop-init
echo " kill \$pid || exit 1" >>$config_dir/.stop-init
echo " touch $var_dir/stop-flag" >>$config_dir/.stop-init