From ae9c494375168c0fef5d6b3ced5d53ab8e0753ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EC=9D=B4=EC=88=98=EC=A4=80?= <june@june-2.local>
Date: Mon, 23 Oct 2023 14:54:07 +0900
Subject: [PATCH] FIX: fix for parameter app-setting

---
 app-setting.sh        | 6 ++++--
 sdt-cloud-app.service | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/app-setting.sh b/app-setting.sh
index 6fc79ad..ca3d858 100755
--- a/app-setting.sh
+++ b/app-setting.sh
@@ -1,10 +1,12 @@
 #!/bin/bash
 
-if [ -z $1 ]; then
-	echo "Please fill in app's name."
+if [ -z $1 ] || [ -z $2 ] || [ -z $3 ] ; then
+	echo "Please fill in app's name, exe's path, exe's file."
 	exit
 fi
 
 mv sdt-cloud-app.service $1.service
 sudo sed -i "s/sdt-cloud-app/$1/g" ./install.sh
+sudo sed -i "s/exePath/$2/g" ./install.sh
+sudo sed -i "s/exeFile/$3/g" ./install.sh
 
diff --git a/sdt-cloud-app.service b/sdt-cloud-app.service
index 09e2c10..613e59f 100644
--- a/sdt-cloud-app.service
+++ b/sdt-cloud-app.service
@@ -2,7 +2,7 @@
 Description=sdt-cloud-app
 
 [Service]
-ExecStart=/usr/bin/python3 /usr/local/sdt/app/appName/main.py -config appName
+ExecStart=exePath /usr/local/sdt/app/appName/exeFile -config appName
 Restart=always
 RestartSec=10