FIX: fix for parameter app-setting
This commit is contained in:
parent
125f7d118d
commit
ae9c494375
|
@ -1,10 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ -z $1 ]; then
|
if [ -z $1 ] || [ -z $2 ] || [ -z $3 ] ; then
|
||||||
echo "Please fill in app's name."
|
echo "Please fill in app's name, exe's path, exe's file."
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv sdt-cloud-app.service $1.service
|
mv sdt-cloud-app.service $1.service
|
||||||
sudo sed -i "s/sdt-cloud-app/$1/g" ./install.sh
|
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
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Description=sdt-cloud-app
|
Description=sdt-cloud-app
|
||||||
|
|
||||||
[Service]
|
[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
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue