Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
carberry:rpi:daemons:carberry [2018/04/17 08:44]
admin
carberry:rpi:daemons:carberry [2022/04/13 10:33] (current)
admin
Line 17: Line 17:
 Enter home directory: Enter home directory:
  
-  cd /home/pi/+  cd
  
 Download the daemon: Download the daemon:
  
-  curl -O -J http://​www.carberry.it/​down.php?​download_id=709+  curl -O -J "https://​www.carberry.it/​index.php?route=download/​download/​download&​download_id=30"
   ​   ​
 Untar the file: Untar the file:
  
-  tar -xvf carberry_d_1.1.tar+  tar -xvf carberry_d_1.5.tar
  
 Build the daemon Build the daemon
  
-  cd /home/​pi/​carberry_d+  cd carberry_d/
   gcc -o carberry carberry.c   gcc -o carberry carberry.c
  
 Add execution rights to just built carberry Add execution rights to just built carberry
  
-  sudo chmod +x /​home/​pi/​carberry_d/​carberry+  sudo chmod +x carberry
  
 Try to execute carberry: Try to execute carberry:
  
-  ​/​home/​pi/​carberry_d/carberry+  ​./carberry
  
 You will see something like this: You will see something like this:
  
-  pi@raspberrypi ~ $ /​home/​pi/​carberry_d/carberry+  pi@raspberrypi ~ $ ./carberry
   Carberry Started   Carberry Started
     ​     ​
Line 49: Line 49:
  
 ==== Install the daemon ==== ==== Install the daemon ====
 +
 +Back to home directory
 +
 +  cd
 +
 +Create directory in /​usr/​local/​bin
 +
 +  sudo mkdir -p /​usr/​local/​bin/​carberry
 +
 +Move directory to /​usr/​local/​bin/​carberry
 +
 +  sudo mv carberry_d /​usr/​local/​bin/​carberry/​
  
 Move the service file in /etc/init.d Move the service file in /etc/init.d
  
-  sudo mv /home/pi/​carberry_d/​carberry.sh /​etc/​init.d/​carberry+  sudo mv /usr/local/​bin/​carberry/​carberry_d/​carberry.sh /​etc/​init.d/​carberry
  
 Add execution rights to the service script Add execution rights to the service script
Line 85: Line 97:
  
   pi@raspberrypi ~/​carberry_d $ ps aux | grep carberry   pi@raspberrypi ~/​carberry_d $ ps aux | grep carberry
-  root     ​29523 ​ 0.0  0.0   ​2576 ​  360 ?        S    14:35   0:00 /home/pi/​carberry_d/​carberry+  root     ​29523 ​ 0.0  0.0   ​2576 ​  360 ?        S    14:35   0:00 /usr/local/​bin/​carberry/​carberry_d/​carberry
   pi       ​29657 ​ 0.0  0.1   ​3568 ​  832 pts/0    S+   ​14:​36 ​  0:00 grep --color=auto carberry   pi       ​29657 ​ 0.0  0.1   ​3568 ​  832 pts/0    S+   ​14:​36 ​  0:00 grep --color=auto carberry
  
 The daemon is correctly installed. The daemon is correctly installed.