aboutsummaryrefslogtreecommitdiffstats
path: root/conf/system/afm-user-setup.sh.in
blob: 24795ae6ea6b387487241c311cd2063bc76f098f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!bin/sh

uid=$1
udir=/run/user/$uid

dodir() {
	if ! test -e $1; then
		mkdir -m 700 $1
		chown $uid:$uid $1
		chsmack -a '*' $1
	fi
}

dodir $udir
dodir $udir/apis
dodir $udir/apis/ws
dodir $udir/apis/link

doln() {
	if ! test -e $2; then
		ln -sf $1 $2
		chown -h $uid:$uid $2
		chsmack -a '*' $2
	fi
}

doln @afm_platform_rundir@/display/wayland-0 $udir/wayland-0