|
Lines 43-51
eval "$(/usr/sbin/univention-config-registry shell)"
Link Here
|
| 43 |
create_logfile_if_missing /var/log/univention/server_password_change.log "root:adm" 640 |
43 |
create_logfile_if_missing /var/log/univention/server_password_change.log "root:adm" 640 |
| 44 |
|
44 |
|
| 45 |
tmpfile=$(mktemp /tmp/server_password_change.debug.XXXXXX) |
45 |
tmpfile=$(mktemp /tmp/server_password_change.debug.XXXXXX) |
| 46 |
exec 4>>$tmpfile |
46 |
exec 4>"$tmpfile" |
| 47 |
exec 3>>/var/log/univention/server_password_change.log |
47 |
exec 3> >(exec tee -ia /var/log/univention/server_password_change.log >&4 2>/dev/null) |
| 48 |
exec 3> >(tee -ia "/var/log/univention/server_password_change.log" $tmpfile >/dev/null 2>/dev/null) |
|
|
| 49 |
|
48 |
|
| 50 |
echowithtimestamp "Starting server password change" >&3 |
49 |
echowithtimestamp "Starting server password change" >&3 |
| 51 |
check_exit () { |
50 |
check_exit () { |
|
Lines 55-67
check_exit () {
Link Here
|
| 55 |
trap - DEBUG |
54 |
trap - DEBUG |
| 56 |
exec 4<&- |
55 |
exec 4<&- |
| 57 |
|
56 |
|
| 58 |
if [ -e $new_pass ]; then |
57 |
rm -f "$new_pass" "$old_pass" |
| 59 |
rm -f '$new_pass' |
|
|
| 60 |
fi |
| 61 |
|
| 62 |
if [ -e $old_pass ]; then |
| 63 |
rm -f '$old_pass' |
| 64 |
fi |
| 65 |
|
58 |
|
| 66 |
if [ $return_code -ne 0 ]; then |
59 |
if [ $return_code -ne 0 ]; then |
| 67 |
exec 3>>/var/log/univention/server_password_change.log |
60 |
exec 3>>/var/log/univention/server_password_change.log |
|
Lines 148-153
fi
Link Here
|
| 148 |
|
141 |
|
| 149 |
echowithtimestamp "Proceeding with regular server password change scheduled for today" >&3 |
142 |
echowithtimestamp "Proceeding with regular server password change scheduled for today" >&3 |
| 150 |
|
143 |
|
|
|
144 |
# shellcheck source=debug.sh |
| 151 |
. /usr/lib/univention-server/lib/server_password_change/debug.sh |
145 |
. /usr/lib/univention-server/lib/server_password_change/debug.sh |
| 152 |
|
146 |
|
| 153 |
# Try to use a trivial command just to check that LDAP server is reachable. |
147 |
# Try to use a trivial command just to check that LDAP server is reachable. |