Skip to content

Commit

Permalink
UI admin user Passwort setzen
Browse files Browse the repository at this point in the history
Signed-off-by: openhabian <openhabian@openHABian>
  • Loading branch information
openhabian authored and openhabian committed Nov 14, 2023
1 parent cd2cf96 commit 11b3310
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions functions/storm.house.bash
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ install_extras() {
local dest="/usr/share/openhab/addons/${jar}"
local sudoersFile="011_ems"
local sudoersPath="/etc/sudoers.d"
local passwdCommand="/usr/bin/ssh -p 8101 -o StrictHostKeyChecking=no -i /var/lib/openhab/etc/openhab_rsa openhab@localhost user changePassword admin ${userpw:-1mart!house}"


if [[ ! -f /usr/local/sbin/upgrade_ems && $(whoami) == "root" ]]; then
Expand All @@ -466,6 +467,9 @@ install_extras() {
cond_redirect chown "${username:-openhabian}:openhab" "${OPENHAB_USERDATA:-/var/lib/openhab}/etc/openhab_rsa*"
cond_redirect install -m 640 "${includesDir}/generic/ems.key" $deckey

# shellcheck disable=SC2046
cond_redirect $(${passwdCommand})

# lc
if ! cond_redirect install -m 644 -t "${serviceTargetDir}" "${includesDir}"/generic/lc.timer; then rm -f "$serviceTargetDir"/lc.{service,timer}; echo "FAILED (setup lc)"; return 1; fi
if ! cond_redirect install -m 644 -t "${serviceTargetDir}" "${includesDir}"/generic/lc.service; then rm -f "$serviceTargetDir"/lc.{service,timer}; echo "FAILED (setup lc)"; return 1; fi
Expand Down

0 comments on commit 11b3310

Please sign in to comment.