FIX: fix test code
This commit is contained in:
parent
b3fc155d9d
commit
674188d1d8
|
@ -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
|
4
main.py
4
main.py
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue