treewide: Update webui password on password change

If the password is changed via SSH, the web UI still
used the old password until uhttpd is restart.

Fix it by forcing uhttpd restart when passwd is called.

Fixes: #11 (gitea)

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
[add commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Robert Langhammer 2020-12-21 18:25:47 +01:00 committed by Adrian Schmutzler
parent 0092713196
commit 1146a81a64
1 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,9 @@ export HOME=${HOME:-/root}
[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
# update uhttpd passwd on passwd-change
[ -e /etc/rc.d/S50uhttpd ] && passwd() { /bin/passwd && /etc/init.d/uhttpd restart; }
# I'm lazy, let's add some aliases
alias ..='cd ..'
alias ...='cd ../..'
@ -22,4 +25,4 @@ alias ll='ls -alF'
alias ls='ls --color=auto'
# and color my prompt
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '