بدون توضیح

Markus Hennecke 535870f832 PostgreSQL 16 requires libm when linking 11 ماه پیش
htdocs e6b7f150c1 Add pressure and battery to sensor data 1 سال پیش
input 535870f832 PostgreSQL 16 requires libm when linking 11 ماه پیش
output 535870f832 PostgreSQL 16 requires libm when linking 11 ماه پیش
sql 4122e1149f Unify param handling and response, add error path 1 سال پیش
.gitignore e753f13b0c Add output CGI to ignore list 6 سال پیش
Makefile 27fc3c6ce1 Add HTML/JS plotting of temperature and humidity 6 سال پیش
README.md 8f74474f97 Add missing config variables to README.md 6 سال پیش
cflags.mk 2a3d602a10 Fix building with PostgreSQL 12 4 سال پیش
cgiconfig.mk b07d3aba67 Add start/end date selectors in overview.html 6 سال پیش
db.c 0b898a84bd Fix db_disconnect() implementation 11 ماه پیش
db.h 4122e1149f Unify param handling and response, add error path 1 سال پیش
util.c 4122e1149f Unify param handling and response, add error path 1 سال پیش
util.h 4122e1149f Unify param handling and response, add error path 1 سال پیش

README.md

Weatherdata

CGIs for adding and retrieving weatherdata, at this time temperature and humidity.

Database setup

Create database user weatherdata: createuser -U postgres -D -l -R -S --pwprompt weatherdata

Create the database and make the weatherdata user the owner: createdb -U postgres -E UTF8 -O weatherdata weatherdata

Add the data table to the database: psql -U weatherdata -f sql/database.sql weatherdata

Configuration

An optional make include named 'localconfig.mk' may be used to overwrite variables defined in 'cgiconfig.mk'. Possible configuration settings and their default settings are:

Database

  • DATABASE_HOSTNAME: 127.0.0.1

  • DATABASE_PORT: 5432

  • DATABASE_USER: weatherdata

  • DATABASE_PASSWORD: The password the weatherdata user is connecting to the database. This will end up in 'localconfig.mk' most likely.

Webserver

  • HTDOCS_PATH: Path to the document root the webserver uses to serve HTML, defaults to /var/www/htdocs.

  • WWW_USER: The user that will own the installed files, defaults to www.

  • WWW_GROUP: The group the files will be installed with, defaults to www.

Building CGIs

Prerequisites

The make files are valid on OpenBSD systems, the postgresql-client and kcgi packages needs to be installed to build the CGIs.

It is assumed that the slowcgi(8) daemon is running.

Build the CGIs

make all

Installation

As root issue make install.