started working on compsrv package

This commit is contained in:
Joel Klimont 2022-10-04 20:28:58 +02:00
parent 5b2b7e4ea4
commit cc79faf13f
4 changed files with 31 additions and 0 deletions

0
server_v2/CMakeLists.txt Normal file → Executable file
View file

17
server_v2/build_deb.sh Executable file
View file

@ -0,0 +1,17 @@
fpm \
-s dir -t deb \
-m '"Joel Klimont" <joel.klimont@gmail.com>' \
--license 'proprietary' \
--description 'Library for robot used in the competition' \
--deb-priority "optional" \
--deb-systemd "compsrv.service" \
--after-install postinstall.sh \
--after-upgrade postinstall.sh \
-p compsrv-1.0.0-0-any.deb \
--name compsrv \
--version 1.0.0-0 \
--architecture all \
./build/compsrv=/usr/bin/compsrv
# dpkg-deb -xv compsrv-1.0.0-0-any.deb test_bin
# sudo rm -rf test_bin/usr test_bin/lib

11
server_v2/compsrv.service Executable file
View file

@ -0,0 +1,11 @@
[Unit]
Description=Complib backend control server
[Service]
ExecStart=/usr/bin/compsrv
Environment="debug=False"
Restart=always
RestartSec=5
Type=notify
[Install]
Alias=compsrv
WantedBy=default.target

3
server_v2/postinstall.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
service compsrv restart
systemctl enable compsrv