Ensure tobiko.log is writable.
Change-Id: Ie12cb3be8f24a9bd24bae28d4a87b9661aaab1df
This commit is contained in:
parent
0b93f34b72
commit
b2c1698245
@ -10,6 +10,16 @@ function install_tobiko {
|
||||
|
||||
|
||||
function configure_tobiko {
|
||||
# Ensure any user can write to log file
|
||||
local log_dir=$(dirname ${TOBIKO_LOG_FILE})
|
||||
if ! [ -d "${log_dir}" ]; then
|
||||
sudo mkdir -p "${log_dir}"
|
||||
fi
|
||||
if ! [ -w "${TOBIKO_LOG_FILE}" ]; then
|
||||
sudo touch "${TOBIKO_LOG_FILE}"
|
||||
sudo chmod ugo+rw "${TOBIKO_LOG_FILE}"
|
||||
fi
|
||||
|
||||
# Write configuration to a new temporary file
|
||||
local tobiko_conf_file=$(mktemp)
|
||||
if [ -f "${TOBIKO_CONF_FILE}" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user