Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
Get server ip to server smbserver configuration entry
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJKM committed May 26, 2020
1 parent 2d4ceaa commit 8bfd460
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions clientapi/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ sed -i "s|REPLACE_MYSQL_USER|$MYSQL_USER|g" /var/www/html/config.php
sed -i "s|REPLACE_MYSQL_PASSWORD|$MYSQL_PASSWORD|g" /var/www/html/config.php
sed -i "s|REPLACE_MYSQL_DATABASE|$MYSQL_DATABASE|g" /var/www/html/config.php
sed -i "s|REPLACE_GLOBAL_PASSWORD|$GLOBAL_PASSWORD|g" /var/www/html/config.php
sed -i "s|REPLACE_HOST_NETWORK_ADDRESS|$HOST_NETWORK_ADDRESS|g" /var/www/html/config.php

# generate https key and certificate
if [ ! -f /etc/clientapi/privkey.pem ]; then
Expand Down
2 changes: 1 addition & 1 deletion clientapi/php/client.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
array('networkfailed', "Nutzername falsch oder Netzwerkfehler."),
array('success', "Anmeldung erfolgreich!"),
array('shutdown', 300),
array('smbserver', $result['settings']),
array('smbserver', HOST_NETWORK_ADDRESS),
array('driveone', "X:"),
array('drivetwo', "Y:"),
array('drivethree', "Z:"),
Expand Down
1 change: 1 addition & 0 deletions clientapi/php/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
const MYSQL_PASSWORD = "REPLACE_MYSQL_PASSWORD";
const MYSQL_DATABASE = "REPLACE_MYSQL_DATABASE";
const GLOBAL_PASSWORD = "REPLACE_GLOBAL_PASSWORD";
const HOST_NETWORK_ADDRESS = "REPLACE_HOST_NETWORK_ADDRESS";
?>
3 changes: 2 additions & 1 deletion service.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"GLOBAL_PASSWORD",
"MYSQL_PASSWORD",
"MYSQL_USER",
"MYSQL_DATABASE"
"MYSQL_DATABASE",
"HOST_NETWORK_ADDRESS"
]
}
],
Expand Down

0 comments on commit 8bfd460

Please sign in to comment.