Make signer and signer_client work with minimal changes

This commit is contained in:
Jan Dittberner 2021-08-27 17:41:26 +02:00 committed by Jan Dittberner
parent 5c924ee206
commit 0857806acf
3 changed files with 8 additions and 4 deletions

View file

@ -101,6 +101,7 @@ services:
volumes: volumes:
- certstaging:/srv/certs - certstaging:/srv/certs
- signersockets:/srv/sockets - signersockets:/srv/sockets
- webdbincl:/home/cacert/www/includes/
depends_on: depends_on:
- db - db
- smtp - smtp
@ -126,4 +127,5 @@ volumes:
maildir: { } maildir: { }
certstaging: { } certstaging: { }
signersockets: { } signersockets: { }
signerdata: { } signerdata: { }
webdbincl: { }

View file

@ -23,7 +23,7 @@ if [ ! -f /srv/ca/gpg/gpg_root_0/secring.gpg ]; then cp /srv/testca/gpg/gpg_root
if [ ! -f /srv/ca/gpg/gpg_root_0/pubring.gpg ]; then cp /srv/testca/gpg/gpg_root_0/pubring.gpg /srv/ca/gpg/gpg_root_0/pubring.gpg; fi if [ ! -f /srv/ca/gpg/gpg_root_0/pubring.gpg ]; then cp /srv/testca/gpg/gpg_root_0/pubring.gpg /srv/ca/gpg/gpg_root_0/pubring.gpg; fi
rm -f /srv/sockets/signer rm -f /srv/sockets/signer
socat -d -d PTY,link=/dev/ttyUSB0 UNIX-LISTEN:/srv/sockets/signer 2>&1 & socat -d -d "PTY,link=${SERIAL_PORT}" UNIX-LISTEN:/srv/sockets/signer 2>&1 &
sleep 1 sleep 1
cd /srv/CommModule/ cd /srv/CommModule/

View file

@ -2,10 +2,12 @@
set -eu set -eu
socat -d -d UNIX:/srv/sockets/signer PTY,link=/dev/ttyS0 2>&1 & export SERIAL_PORT=/dev/ttyUSB0
socat -d -d "UNIX:/srv/sockets/signer" "PTY,link=${SERIAL_PORT}" 2>&1 &
sleep 1 sleep 1
export SERIAL_PORT=/dev/ttyS0 echo "<?php mysql_connect(\"${MYSQL_WEBDB_HOSTNAME}\", \"${MYSQL_WEBDB_USER}\", \"${MYSQL_WEBDB_PASSWORD}\");" > "/home/cacert/www/includes/mysql.php"
cd /srv/CommModule/ cd /srv/CommModule/