Merge pull request #3846 from drmartinberger/patch-1

Update bonus.fints.sh: set default encrypted FinTS PIN within dbsetup.sql
This commit is contained in:
/rootzoll 2023-05-16 21:19:35 +02:00 committed by GitHub
commit b3aa01a435
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -251,6 +251,9 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
sudo mariadb -e "GRANT ALL PRIVILEGES ON fints.* TO 'fintsuser' IDENTIFIED BY 'fints';" sudo mariadb -e "GRANT ALL PRIVILEGES ON fints.* TO 'fintsuser' IDENTIFIED BY 'fints';"
sudo mariadb -e "FLUSH PRIVILEGES;" sudo mariadb -e "FLUSH PRIVILEGES;"
if [ -f "dbsetup.sql" ]; then if [ -f "dbsetup.sql" ]; then
# set default encrypted PIN 123456789 within dbsetup.sql if not yet set
sudo sed -i -e "s/REPLACE_ENCRYPTED_PIN/$(mvn compile exec:java -Dexec.mainClass="net.petafuel.fuelifints.cryptography.aesencryption.AESUtil" -Dexec.args=123456789 -q)/g" dbsetup.sql
mariadb -ufintsuser -pfints fints < dbsetup.sql mariadb -ufintsuser -pfints fints < dbsetup.sql
else else
echo "# FAIL - dbsetup.sql not found - deleting code & exit" echo "# FAIL - dbsetup.sql not found - deleting code & exit"
@ -319,8 +322,8 @@ WantedBy=multi-user.target
sudo sed -i "s/^keystore_location =.*/keystore_location = \/mnt\/hdd\/app-data\/fints\/keystore.jks/g" /home/fints/config/fuelifints.properties sudo sed -i "s/^keystore_location =.*/keystore_location = \/mnt\/hdd\/app-data\/fints\/keystore.jks/g" /home/fints/config/fuelifints.properties
sudo sed -i "s/^keystore_password =.*/keystore_password = raspiblitz/g" /home/fints/config/fuelifints.properties sudo sed -i "s/^keystore_password =.*/keystore_password = raspiblitz/g" /home/fints/config/fuelifints.properties
# config app basics: blz.banking2.properties.example # config app basics: blz.banking2.properties.example: blz needs to be replaced with bankcode of fuelifints.properties
sudo -u fints cp /home/fints/fints/config/blz.banking2.properties.example /home/fints/config/blz.banking2.properties sudo -u fints cp /home/fints/fints/config/blz.banking2.properties.example /home/fints/config/12345678.banking2.properties
# config app basics: lnbits.properties # config app basics: lnbits.properties
sudo -u fints cp /home/fints/fints/config/lnbits.properties.example /home/fints/config/lnbits.properties sudo -u fints cp /home/fints/fints/config/lnbits.properties.example /home/fints/config/lnbits.properties
@ -427,4 +430,4 @@ fi
# just a basic error message when unknown action parameter was given # just a basic error message when unknown action parameter was given
echo "# FAIL - Unknown Parameter $1" echo "# FAIL - Unknown Parameter $1"
exit 1 exit 1