Deamon installation described
This commit is contained in:
17
client/ledBoard.service
Normal file
17
client/ledBoard.service
Normal file
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Log uptime in scoreboard
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
User=c3ma
|
||||
|
||||
# Specify users home as working directory
|
||||
WorkingDirectory=/home/c3ma/
|
||||
# Define wrapper to update and start project
|
||||
ExecStart=/usr/bin/bash <project home>/client/ledboard.sh
|
||||
TimeoutStartSec=0
|
||||
|
||||
[Install]
|
||||
WantedBy=network.target
|
12
client/ledboard.sh
Executable file
12
client/ledboard.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Wrapper script to update project and build project
|
||||
#
|
||||
#Set target IP address
|
||||
IP=
|
||||
# Path to this project
|
||||
HOSTCLIENT=
|
||||
cd $HOSTCLIENT
|
||||
/usr/bin/pkill LEDboardClient
|
||||
git pull
|
||||
cargo build
|
||||
$HOSTCLIENT/target/debug/LEDboardClient $IP
|
Reference in New Issue
Block a user