wo-bisch.ch Webapp
Go to file
Joerg Lehmann 7f639bca49 new address 2025-05-14 06:30:42 +02:00
snippets new address 2025-05-14 06:30:42 +02:00
static price change 2022-06-04 19:22:48 +02:00
systemd finetune payment 2021-04-06 17:01:11 +02:00
templates disable ordering possibility 2024-05-24 14:37:31 +02:00
wo-bisch-sass update bulma, cleanup 2021-03-27 20:43:53 +01:00
.gitignore update bulma, cleanup 2021-03-27 20:43:53 +01:00
Dockerfile timezone in docker image 2022-12-28 17:14:09 +01:00
README.md add influx command to readme 2022-12-27 19:12:58 +01:00
abocost.go finetune payment 2021-04-06 17:01:11 +02:00
authentication.go Initial commit 2021-03-09 20:32:57 +01:00
check_nodes.go set mail content type to utf-8 2024-05-04 13:19:12 +02:00
go.mod update go version 2023-03-04 19:25:44 +01:00
go.sum update go version 2023-03-04 19:25:44 +01:00
helper.go refactor email send functions 2022-07-13 19:22:43 +02:00
log.go Initial commit 2021-03-09 20:32:57 +01:00
mail.go set mail content type to utf-8 2024-05-04 13:19:12 +02:00
main.go integrate check_nodes in wo-bisch-web 2022-07-14 19:38:33 +02:00
metrics.go use same logig for date calculation as mini-beieli-web 2022-08-01 10:58:09 +02:00
minify-fa-js.py Initial commit 2021-03-09 20:32:57 +01:00
minify-fa.sh add download feature 2021-04-05 10:53:49 +02:00
order.go work on order form 2021-04-03 11:43:35 +02:00
persistence.go add payment years to expiration date, not now 2022-09-15 18:17:15 +02:00
stripe.go make it the same as mini-beieli-web 2023-02-03 19:08:45 +01:00
tracker.go refactor email send functions 2022-07-13 19:22:43 +02:00

README.md

wo-bisch-web - LoraWAN GPS Tracker

Webapplikation, geschrieben in Golang.

Administration

Redis Commands

$ redis-cli

Show all keys:
127.0.0.1:6379> keys *

Create new user (devs prefixed with @ are read-only devs):
127.0.0.1:6379> HMSET user:joerg.lehmann@nbit.ch my_devs "0002CC01000003E4,@0002CC01000003E5"

Show all values of a key
127.0.0.1:6379> HGETALL user:joerg.lehmann@nbit.ch
 1) "last_login"
 2) "2020-04-11 13:41:57"
 3) "confirm_id"
 4) ""
 5) "password"
 6) "$2a$10$XdDSG2E9SpVuxLE59JWwsO9aJtbrwArSflBGwGVvjWDEQecXEUo06"
 7) "my_devs"
 8) "0002CC01000003E4,@0002CC01000003F5,0002CC01000003F1,0002CC01000003F7,0002CC01000003F3,0002CC01000003E1,0002CC01000003D4,0002CC01000003EC,0002CC01000003E2"
 9) "new_password"
10) "$2a$10$XdDSG2E9SpVuxLE59JWwsO9aJtbrwArSflBGwGVvjWDEQecXEUo06"

Set password (htpasswd in httpd-tools rpm):
$ htpasswd -nbBC 5 USER PASSWORD


27.0.0.1:6379> HMSET user:joerg.lehmann@nbit.ch password '$2a$10$TmNA6PDKWBnMw/XcJ0DDi.zpWzZB0RYyrKc8Bh3x6LHAyCxbByhkC'

Change active_until date:
127.0.0.1:6379> HMSET dev:0002CC01000003E2 active_until "01.05.2021"

show range of last values:
127.0.0.1:6379> LRANGE lastvalues:0002CC01000003E4 0 -1

Autor: Joerg Lehmann, nbit Informatik GmbH

Influxdb Commands

Show tokens
# influx auth ls

Clone Admin Token in Webgui if not known anymore and use this to get all tokens:

Create Default Config:
# influx config create --config-name default --token XXXXXXXXXXX --host-url http://127.0.0.1:8086 -a

Update Token in Default Config:
# influx config update --config-name default --token XXXXXXXXXXX

Backup Influxdb:
# influx backup /root/joergs-backup -t XXXXXadmintokenXXXXX

Restore Influxdb:
# influx restore /var/lib/influxdb2/joergs-backup/ --full