install.fairie/system/var/log/user/run_onchange_after-symlink-user-logs
Brian Zalewski e58f91cb9e Update 9 files
- /home/dot_local/bin/run_onchange_ensure-executable.tmpl
- /home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs.tmpl
- /home/dot_ssh/run_onchanges_after_ensure-private-key.tmpl
- /home/dot_ssh/run_onchanges_after_generate-public-keys.tmpl
- /home/Library/Fonts/run_onchange_after_add-fonts.tmpl
- /system/usr/share/run_onchange_after_setup-share-folder
- /system/usr/local/share/run_onchange_after_setup-share-folder
- /system/var/log/user/run_onchange_after-symlink-user-logs
- /system/etc/default/modify_grub
2022-12-25 09:09:00 +00:00

13 lines
495 B
Bash

#!/usr/bin/env bash
# home directories: {{ output ("find" .host.homeParentFolder "-maxdepth" "1" "-type" "d" "|" "xargs" "echo") }}
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
find /home -maxdepth 1 -type d | while read HOME_DIR; do
USER_FOLDER="$(echo "$HOME_DIR" | sed 's/\/\([^\/]*\)/\1/')"
if [ ! -d "/var/log/user/$USER_FOLDER" ] && [ -d "$HOME_DIR/.local/log" ]; then
sudo ln -s "$HOME_DIR/.local/log" "/var/log/user/$USER_FOLDER"
fi
done