mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-19 11:20:15 +00:00
Get rows/cols with stty instead of tput
This commit is contained in:
parent
6858805d9f
commit
7c64afdc92
2 changed files with 4 additions and 4 deletions
|
@ -18,8 +18,8 @@ pivpnFilesDir="/etc/.pivpn"
|
|||
|
||||
|
||||
# Find the rows and columns
|
||||
rows=$(tput lines)
|
||||
columns=$(tput cols)
|
||||
rows=$(stty size | awk '{print $1}')
|
||||
columns=$(stty size | awk '{print $2}')
|
||||
|
||||
# Divide by two so the dialogs take up half of the screen, which looks nice.
|
||||
r=$(( rows / 2 ))
|
||||
|
|
|
@ -23,8 +23,8 @@ PORT=$(cat /etc/pivpn/INSTALL_PORT)
|
|||
PROTO=$(cat /etc/pivpn/INSTALL_PROTO)
|
||||
|
||||
# Find the rows and columns
|
||||
rows=$(tput lines)
|
||||
columns=$(tput cols)
|
||||
rows=$(stty size | awk '{print $1}')
|
||||
columns=$(stty size | awk '{print $2}')
|
||||
|
||||
# Divide by two so the dialogs take up half of the screen, which looks nice.
|
||||
r=$(( rows / 2 ))
|
||||
|
|
Loading…
Reference in a new issue