FIX: fix test code

This commit is contained in:
이수준 2023-10-23 16:54:11 +09:00
parent b3fc155d9d
commit 674188d1d8
3 changed files with 8 additions and 6 deletions

View File

@ -1,12 +1,14 @@
#!/bin/bash
if [ -z $1 ] || [ -z $2 ] ; then
if [ -z $1 ] || [ -z $2 ] || [ -z $3 ] ; then
echo "Please fill in app's name, file."
exit
fi
mv sdt-cloud-app.service $1.service
sed -i "s/sdt-cloud-app/$1/g" ./install.sh
sed -i "s/sdt-cloud-app/$1/g" ./$1.service
sed -i "s/exeFile/$2/g" ./$1.service
sed -i "s%exePath%$2%g" ./$1.service
sed -i "s/exeFile/$2/g" ./$1.service

View File

@ -7,10 +7,10 @@ import time
import yaml
parser = argparse.ArgumentParser()
parser.add_argument('-config',help='')
parser.add_argument('-app',help='')
args = parser.parse_args()
with open(f'/usr/local/sdt/app/{args.config}/config.json', encoding='UTF-8') as f:
with open(f'/usr/local/sdt/app/{args.app}/config.json', encoding='UTF-8') as f:
jsonData = json.load(f)

View File

@ -2,7 +2,7 @@
Description=sdt-cloud-app
[Service]
ExecStart=exePath /usr/local/sdt/app/appName/exeFile -config appName
ExecStart=exePath /usr/local/sdt/app/appName/exeFile -app appName
Restart=always
RestartSec=10