Browse Source

Properly handle service type detection failures when installing as a system service. (#14658)

Austin S. Hemmelgarn 2 years ago
parent
commit
0275a0d468
1 changed files with 2 additions and 2 deletions
  1. 2 2
      system/install-service.sh.in

+ 2 - 2
system/install-service.sh.in

@@ -644,7 +644,7 @@ detect_linux_svc_type() {
 install_linux_service() {
   t="$(detect_linux_svc_type)"
 
-  if [ -z "${t}" ]; then
+  if [ -z "${t}" ] || [ "${t}" = 'detect' ]; then
     exit 2
   fi
 
@@ -654,7 +654,7 @@ install_linux_service() {
 linux_cmds() {
   t="$(detect_linux_svc_type)"
 
-  if [ -z "${t}" ]; then
+  if [ -z "${t}" ] || [ "${t}" = 'detect' ]; then
     exit 2
   fi