Skip to content

Commit 3cf6f25

Browse files
taketook34AksonovSergei
authored andcommitted
Issue #26: Updated deploy.sh. Added system/.service file
1 parent 81ecd83 commit 3cf6f25

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

deploy.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ if [ -z "$BBB_HOST" ]; then
88
fi
99

1010
# Deploy the software using scp
11+
BBB_HOST_ROOT="${BBB_HOST/debian/root}"
12+
1113
scp build/Target/src/kpi_rover_ecu/kpi_rover_ecu "$BBB_HOST":~
14+
scp system/kpi_rover_ecu.service "$BBB_HOST_ROOT":/etc/systemd/system
15+
ssh "$BBB_HOST_ROOT" 'systemctl daemon-reload'
1216

1317
# Check if scp was successful
1418
if [ $? -eq 0 ]; then

system/kpi_rover_ecu.service

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[Unit]
2+
Description=KPI Rover ECU Service
3+
After=network.target
4+
5+
[Service]
6+
ExecStart=/home/debian/kpi_rover_ecu -a 0.0.0.0 -p 6000
7+
WorkingDirectory=/home/debian
8+
Restart=always
9+
User=root
10+
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
11+
12+
PermissionsStartOnly=true
13+
ExecStartPre=/bin/sleep 2
14+
15+
[Install]
16+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)