summaryrefslogtreecommitdiff
path: root/fireslay
diff options
context:
space:
mode:
Diffstat (limited to 'fireslay')
-rwxr-xr-xfireslay18
1 files changed, 11 insertions, 7 deletions
diff --git a/fireslay b/fireslay
index 3e52a84..9485cd4 100755
--- a/fireslay
+++ b/fireslay
@@ -80,14 +80,18 @@ web_content_pids()
80 then 80 then
81 echo $pid 81 echo $pid
82 fi 82 fi
83 done < $FIREFOX_GROUP/cgroup.procs 83 done < $FIREFOX_GROUP_PROCS
84} 84}
85 85
86CURRENT_GROUP=$(get_current_group) 86uid=$(getent passwd $SUDO_USER | (IFS=: read _ _ id _; echo $id))
87FIREFOX_GROUP=${CURRENT_GROUP%/*}/firefox 87group=user.slice/user-$uid.slice/firefox
88FIREFOX_GROUP_PROCS=$FIREFOX_GROUP/cgroup.procs 88group_procs=/sys/fs/cgroup/$group/cgroup.procs
89 89
90[ -e "$FIREFOX_GROUP_PROCS" ] 90FIREFOX_GROUP_PROCS=$group_procs
91 91if [ -e "$FIREFOX_GROUP_PROCS" ]
92main "$@" 92then
93 main "$@"
94else
95 echo "Error: Firefox group not found ($FIREFOX_GROUP_PROCS)" >&2
96fi
93 97