- fix setup script & config
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user