2023-07-27 12:22:51 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Temporary Install file for testing until binary installation packages are ready
|
|
|
|
|
|
|
|
|
|
|
|
### C-daemon
|
2023-07-27 12:48:11 +03:00
|
|
|
# Pre-Cleaning
|
2023-07-27 12:22:51 +03:00
|
|
|
sudo rm /usr/bin/cdaemontmp
|
|
|
|
sudo rm -rf /usr/lib/cdaemontmp/
|
|
|
|
|
|
|
|
# Building
|
2023-07-27 12:48:11 +03:00
|
|
|
temp_dir="$(mktemp -d)"
|
|
|
|
cd $temp_dir
|
|
|
|
echo $temp_dir
|
2023-07-27 12:22:51 +03:00
|
|
|
git clone https://git.aliberksandikci.com.tr/liderahenk/go-daemon
|
|
|
|
cd go-daemon/
|
|
|
|
go build -o c-daemon/bin/ c-daemon/go-files/info.go
|
|
|
|
gcc -o c-daemon/bin/test c-daemon/daemon/test.c c-daemon/daemon/daemon.c
|
|
|
|
|
|
|
|
# Installing
|
|
|
|
cd c-daemon
|
2023-07-27 12:32:25 +03:00
|
|
|
sudo mv ./bin/test /usr/bin/cdaemontmp
|
|
|
|
sudo mkdir -p /usr/lib/cdaemontmp/
|
2023-07-27 12:48:11 +03:00
|
|
|
sudo mv ./bin/info /usr/lib/cdaemontmp/info
|
|
|
|
sudo mv ./cdaemontmp.service /etc/systemd/system/
|
|
|
|
|
|
|
|
# Post-Cleaning
|
|
|
|
# sudo rm -rf temp_dir
|