From 7188f67683b2cd71220a2db02c38021751da4e3e Mon Sep 17 00:00:00 2001 From: Lukas Plevac Date: Fri, 29 Dec 2023 09:35:40 +0100 Subject: [PATCH] Added instalation as service --- install.sh | 2 +- station/Makefile | 16 ++++++++++++++-- station/yags.service | 13 +++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) mode change 100644 => 100755 install.sh create mode 100644 station/yags.service diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index 1afd3e9..a6df31b --- a/install.sh +++ b/install.sh @@ -38,7 +38,7 @@ git clone https://github.com/Hamlib/Hamlib cd Hamlib ./bootstrap -./configure +./configure --prefix=/usr/local --enable-static make make install diff --git a/station/Makefile b/station/Makefile index e928f55..a817862 100644 --- a/station/Makefile +++ b/station/Makefile @@ -1,6 +1,18 @@ install: + apt install -f libopenblas-dev + pip3 install matplotlib + pip3 install numpy + pip3 install pyorbital + pip3 install pyserial + cp tools/baseband_spectogram.py /usr/local/bin/ chmod +x /usr/local/bin/baseband_spectogram.py - + cp tools/cw_morse.py /usr/local/bin/ - chmod +x /usr/local/bin/cw_morse.py \ No newline at end of file + chmod +x /usr/local/bin/cw_morse.py + + rm -rf /YAGS + mkdir /YAGS + sudo cp -r * /YAGS/ + cp -f yags.service /etc/systemd/system/ + systemctl daemon-reload diff --git a/station/yags.service b/station/yags.service new file mode 100644 index 0000000..58ee834 --- /dev/null +++ b/station/yags.service @@ -0,0 +1,13 @@ +[Unit] +Description=YAGS ground station client +After=syslog.target network.target + +[Service] +WorkingDirectory=/YAGS/ +ExecStart=/usr/bin/python3 main.py + +Restart=always +RestartSec=120 + +[Install] +WantedBy=multi-user.target