4a97d37234
Chrony drops root to user 'chrony' on startup, and so was unable to write to its log dir. Apply our usual chown on start pattern to fix this. Change-Id: Ia54cf5788ad015c3622902bca810bcbaaa948253 Closes-Bug: #1688216
17 lines
365 B
Bash
17 lines
365 B
Bash
#!/bin/bash
|
|
|
|
rm -f /var/run/chronyd.pid
|
|
|
|
CHRONY_LOG_DIR="/var/log/kolla/chrony"
|
|
if [[ ! -d "${CHRONY_LOG_DIR}" ]]; then
|
|
mkdir -p ${CHRONY_LOG_DIR}
|
|
fi
|
|
|
|
if [[ $(stat -c %a ${CHRONY_LOG_DIR}) != "755" ]]; then
|
|
chmod 755 /var/log/kolla/chrony
|
|
fi
|
|
|
|
if [[ $(stat -c %U:%G ${CHRONY_LOG_DIR}) != "chrony:chrony" ]]; then
|
|
chown chrony:chrony ${CHRONY_LOG_DIR}
|
|
fi
|