Debian package: Difference between revisions

From Aquarium-Control
Jump to navigation Jump to search
Line 69: Line 69:
|-
|-
|}
|}
Except for the database dump, the files are copied to their target directories.
The database dump file is extracted to a temporary location and deleted after use.


== Creation of directories and files ==
== Creation of directories and files ==

Revision as of 16:55, 1 January 2026

The Debian package shall check all dependencies and install the application on the Raspberry Pi.

Dependencies

Before starting the installation, the following dependencies are verified

  • Apache 2 with php
  • MariaDB
  • bcrypt (for running the database setup script)

Content

The Debian package contains the following data:

Debian package content
File name Description Origin Target directory
aquarium_control executable of main control target/release of main control repo /usr/local/bin
aquarium_control.toml configuration of main control config of main control repo /etc/aquarium_control
aquarium.sql database dump containing empty database database repo -
aquariumcontrol_database_cleanup_setup.sh script for setting up database maintenance database repo /usr/local/bin
aquariumcontrol_database_setup.sh script for initializing database database repo /usr/local/bin
aquarium_client executable of terminal application target/release of client repo /usr/local/bin
api.php main file of REST API REST API repo /var/www/html
db.php supporting file of REST API REST API repo /var/www/html
functions.php supporting file of REST API REST API repo /var/www/html
balling-manager.html dynamic webpage webpage repo /var/www/html
feed-manager.html dynamic webpage webpage repo /var/www/html
heating-manager.html dynamic webpage webpage repo /var/www/html
index.html dynamic webpage webpage repo /var/www/html
logs.html dynamic webpage webpage repo /var/www/html
refill-manager.html dynamic webpage webpage repo /var/www/html
schedule-manager.html dynamic webpage webpage repo /var/www/html
ventilation-manager.html dynamic webpage webpage repo /var/www/html
14550230.png image for dynamic webpage webpage repo /var/www/html/images
1843544.png image for dynamic webpage webpage repo /var/www/html/images
3173192.png image for dynamic webpage webpage repo /var/www/html/images
4236594.png image for dynamic webpage webpage repo /var/www/html/images
478544.png image for dynamic webpage webpage repo /var/www/html/images
5109802.png image for dynamic webpage webpage repo /var/www/html/images
748967.png image for dynamic webpage webpage repo /var/www/html/images
8593001.png image for dynamic webpage webpage repo /var/www/html/images
9602773.png image for dynamic webpage webpage repo /var/www/html/images
9803219.png image for dynamic webpage webpage repo /var/www/html/images

Except for the database dump, the files are copied to their target directories.

The database dump file is extracted to a temporary location and deleted after use.

Creation of directories and files

The Debian package creates

  • a directory and a set of files for the file-based communication as defined in the section [data_logger] of the configuration file.
  • an empty log file as defined in the section [logger] of the configuration file.

Database creation

During the installation of the package the user is asked if the database for the aquarium control already exists. If the user informs that the database does not exist, the user shall provide the following information:

  • desired database name
  • default user name
  • password

The script will:

  • create the database using the desired database name
  • import the SQL dump to the database
  • create the SQL user with the corresponding user name and password
  • grant all privileges on the database to the user
  • update the main control configuration file with the database name, user name and password

Database update

Message queue creation

Setup of webpage

Additionally, to copying the corresponding php, html and png files from the package to the target directory, the script downloads a set of libraries to /var/www/html/js/:

Setup of main application configuration file

Setup of main application

Setup of terminal client

Instructions to the user