- fix setup script & config

This commit is contained in:
2023-08-10 09:04:48 +03:00
parent 9c0c2fd817
commit b814b54acb
3 changed files with 26 additions and 74 deletions

View File

@@ -28,18 +28,18 @@ read -p "Please specify phone name (ex: moto_1): " PHONE_NAME
read -p "Please specify expected task name (if this is answerer phone):" TASK_NAME
# Get a copy of config file from redist
cp config/agent.in.yaml config/config.yaml
cp config/agent.in.yaml config/agent.yaml
# Replace the values
if [[ $BACKEND_URL != "" ]]; then
sed -i "s/BACKEND_URL/$BACKEND_URL/" config/config.yaml
sed -i "s/BACKEND_URL/$BACKEND_URL/" config/agent.yaml
fi
if [[ $PHONE_NAME != "" ]]; then
sed -i "s/PHONE_NAME/$PHONE_NAME/" config/config.yaml
sed -i "s/PHONE_NAME/$PHONE_NAME/" config/agent.yaml
fi
sed -i "s/TASK_NAME/$TASK_NAME/" config/config.yaml
sed -i "s/TASK_NAME/$TASK_NAME/" config/agent.yaml
# Update systemD unit file
cp config/systemd/agent_gsm.in.service config/systemd/agent_gsm.service