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