Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

Setup script

PR-105 - Getting issue details... STATUS

This script setup-pib.sh can be found in this repository: https://github.com/pib-rocks/pib-backend/blob/main/setup/setup-pib.sh

It’s assumed that the user running this script has “pib“ as a username and the operating system is the latest Raspberry Pi OS.

Here is the description of some variables being used in the script:

TMP_DIR - the directory where the archives with Cerebra, phpLiteAdmin, and the database initialization script will be saved. It’s /home/user/setup_tmp/ by default.

ROS_WORKSPACE - the directory where the ROS2 node for the camera will be installed and the scripts for starting ROS and Cerebra (ros_cerebra_boot.sh) and the camera (ros_camera_boot.sh) as well. It’s /home/user/ros2_ws/ by default.

PHPLITEADMIN_INSTALLATION_DIR - the directory where the phpLiteAdmin is being installed. It’s /var/www/phpliteadmin by default.

DATABASE_DIR - the directory where the database is being initialized. It’s /home/user/pib_data by default.

DEFAULT_NGINX_HTML_DIR - the directory where Cerebra will be unzipped. It’s etc/nginx/html by default.

_URL variables contain links to download all necessary files and packages.

…_FILE and …_ZIP variables describe the filenames to save the downloaded resources.

To check if ROS successfully started, execute the command:

systemctl status ros_cerebra_boot.service

If ROS is running you will see similar output:

With the following command, you can check the running ros nodes:

ros2 node list

To check if Cerebra successfully started, execute the command:

sudo systemctl status nginx

Or the alternative:

sudo systemctl is-active nginx

In this case, the output will be simpler:

  • No labels