add unit file and update install script
This commit is contained in:
parent
fcd25825ac
commit
5a16a9e503
2 changed files with 21 additions and 3 deletions
12
c-daemon/cdaemontmp.service
Normal file
12
c-daemon/cdaemontmp.service
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=cdaemon temporary service
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/cdaemontmp
|
||||
PIDFile=/var/run/cdaemontmp.pid
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
12
c-daemon/tmp-install.sh
Normal file → Executable file
12
c-daemon/tmp-install.sh
Normal file → Executable file
|
@ -4,19 +4,25 @@
|
|||
|
||||
|
||||
### C-daemon
|
||||
# Cleaning
|
||||
# Pre-Cleaning
|
||||
sudo rm /usr/bin/cdaemontmp
|
||||
sudo rm -rf /usr/lib/cdaemontmp/
|
||||
|
||||
# Building
|
||||
temp_dir="$(mktemp -d)"
|
||||
cd $temp_dir
|
||||
echo $temp_dir
|
||||
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
|
||||
# move to
|
||||
cd c-daemon
|
||||
sudo mv ./bin/test /usr/bin/cdaemontmp
|
||||
sudo mkdir -p /usr/lib/cdaemontmp/
|
||||
sudo mv ./bin/info /usr/lib/cdaemontmp/info
|
||||
sudo mv ./bin/info /usr/lib/cdaemontmp/info
|
||||
sudo mv ./cdaemontmp.service /etc/systemd/system/
|
||||
|
||||
# Post-Cleaning
|
||||
# sudo rm -rf temp_dir
|
Loading…
Reference in a new issue