This commit is contained in:
Richard Sperry 2025-04-17 12:23:28 -07:00
parent 094802b275
commit 29a56f36d8
2 changed files with 8 additions and 5 deletions

View file

@ -21,7 +21,6 @@ hassio_role: manager
homeassistant_api: true
privileged:
- SYS_ADMIN
full_access: true
map:
- backup:rw
- data:rw

View file

@ -43,9 +43,8 @@ run() {
setup_clean_view() {
# Links some common directories to the user's home folder for convenience
for dir in "${DIRECTORIES[@]}"; do
if [ -e /"${dir}" ]; then
current="${CODE_SERVER_WORKSPACE_DIR}"/"${dir}"
if [ -e /"${dir}" ]; then
if [ ! -e "${current}" ]; then
bashio::log.warning "Creating link for: ${dir}..."
ln -sn "/${dir}" "$current" ||
@ -58,9 +57,14 @@ setup_clean_view() {
else
bashio::log.info "${dir} has good link."
fi
else
if [ -e "${current}" ]; then
rm "${current}"
bashio::log.warning "${dir} does not exist, cannot link, removed existing link..."
else
bashio::log.warning "${dir} does not exist, cannot link..."
fi
fi
done
if [[ ! -d "${CODE_SERVER_WORKSPACE_DIR}"/code-server-config ]]; then