export into config

This commit is contained in:
2025-11-28 22:37:29 +01:00
parent 6efac21a22
commit 6cb3c5eeb4
3 changed files with 19 additions and 3 deletions

6
config Normal file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
# Number of clients, maximum 2
CLIENTS=1
EVENT="Chaospott"

View File

@@ -1,6 +1,13 @@
#!/bin/bash
DEVICE=/dev/ttyUSB2
function init() {
if [ -n "$PRINTDEVICE" ]; then
export DEVICE="$PRINTDEVICE"
else
export DEVICE=/dev/ttyUSB2
fi
stty -F $DEVICE 1:0:80000dbd:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
# \x1b\x47 - Double Strike

View File

@@ -1,10 +1,13 @@
#!/bin/bash
export LANG=C
export EVENT=DiVOC
export TERM=vt220
export DIALOGRC=dialogrc
source ./config
export PRINTDEVICE="/dev/ttyUSB$CLIENTS"
LOCKFILE=/tmp/c3govlock
TMP=/tmp/$RANDOM
BT="c3gov - v0.5"
@@ -388,7 +391,7 @@ function askForFunnyUserCreds() {
askPw 12 "Login" "Password:" ""
password=$(cat $TMP)
if [ -f .pw/$username ]; then
if [ -f ".pw/$username" ]; then
if [ "$password" != $(cat .pw/$username) ]; then
clear
echo "Wrong credentials."