Simplify, supress output
This commit is contained in:
@@ -19,13 +19,8 @@ main() {
|
|||||||
# Add user to tty group for /dev/pts/* access
|
# Add user to tty group for /dev/pts/* access
|
||||||
addgroup "${username}" tty 2>/dev/null
|
addgroup "${username}" tty 2>/dev/null
|
||||||
|
|
||||||
if tty -s; then
|
if [ -c "/dev/pts/0" ]; then
|
||||||
local tty_device
|
chmod g+rw "/dev/pts/0" 2>/dev/null
|
||||||
tty_device="$(tty)"
|
|
||||||
|
|
||||||
if [ -f "${tty_device}" ]; then
|
|
||||||
chmod g+rw "${tty_device}" 2>/dev/null
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
main "${@}"
|
main "${@}"
|
||||||
|
|||||||
Reference in New Issue
Block a user