summaryrefslogtreecommitdiff
path: root/openrc/conf.d/user.template
blob: 2bf637b0bd47b91bc1273e3dd548dc7d06f9dc85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
UID="$$(id -u ${USER})"
if test -z "$${XDG_RUNTIME_DIR}"; then
  export XDG_RUNTIME_DIR=/tmp/xdg/"$${UID}"-xdg-runtime-dir
    if ! test -d "$${XDG_RUNTIME_DIR}"; then
      mkdir -p "$${XDG_RUNTIME_DIR}"
      chown -R ${USER}:${USER} "$${XDG_RUNTIME_DIR}"
      chmod -R 0700 "$${XDG_RUNTIME_DIR}"
    fi
fi
if ! test -f "$${XDG_RUNTIME_DIR}/openrc/softlevel"; then
  mkdir -p "$${XDG_RUNTIME_DIR}/openrc"
  touch "$${XDG_RUNTIME_DIR}/openrc/softlevel"
  chown -R ${USER}:${USER} "$${XDG_RUNTIME_DIR}"
  chmod -R 0700 "$${XDG_RUNTIME_DIR}"
fi