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
Last revision Both sides next revision
carberry:rpi:daemons:carberry [2019/09/30 13:44]
127.0.0.1 external edit
carberry:rpi:daemons:carberry [2022/04/13 10:26]
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=719+  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.2.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
 +
 +  sudo mkdir -p /​usr/​local/​bin/​carberry
 +
 +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.