patch-tracking/0001-fix-uwsgi-path-not-found-issue.patch

26 lines
1.2 KiB
Diff
Raw Normal View History

2024-05-07 03:32:42 +08:00
From b756c4d49636d935adab3422b3d7967992b4cfdc Mon Sep 17 00:00:00 2001
From: hanjinpeng <hanjinpeng@kylinos.cn>
Date: Tue, 7 May 2024 11:05:48 +0800
Subject: [PATCH] fix uwsgi path not found issue
---
patch_tracking/patch-tracking | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/patch_tracking/patch-tracking b/patch_tracking/patch-tracking
index f5961fc..b0f4fce 100755
--- a/patch_tracking/patch-tracking
+++ b/patch_tracking/patch-tracking
@@ -8,4 +8,7 @@ settings_file='/etc/patch-tracking/settings.conf'
server=`grep 'LISTEN' $settings_file | awk -F'=' '{print $2}' | sed -e 's/^[ ]"//g' | sed -e 's/"$//g'`
-/usr/local/bin/uwsgi --master --https "${server},/etc/patch-tracking/self-signed.crt,/etc/patch-tracking/self-signed.key" --wsgi-file "${app_file}" --callable app --chdir "${chdir_path}" --threads 100 --lazy
+echo $PATH | grep -q -E "/usr/bin" || PATH=$PATH:/usr/bin
+echo $PATH | grep -q -E "/usr/sbin" || PATH=$PATH:/usr/sbin
+
+uwsgi --master --https "${server},/etc/patch-tracking/self-signed.crt,/etc/patch-tracking/self-signed.key" --wsgi-file "${app_file}" --callable app --chdir "${chdir_path}" --threads 100 --lazy
--
2.43.0