1 | 1 | | #!/bin/bash |
2 | 2 | | |
| 3 | + | YUM_CMD=$(which yum) |
| 4 | + | APT_GET_CMD=$(which apt-get) |
| 5 | + | |
| 6 | + | if [[ ! -z $YUM_CMD ]]; then |
| 7 | + | yum install -y dialog |
| 8 | + | elif [[ ! -z $APT_GET_CMD ]]; then |
| 9 | + | apt-get install -y dialog |
| 10 | + | else |
| 11 | + | echo "error can't install package dialog" |
| 12 | + | exit 1; |
| 13 | + | fi |
| 14 | + | |
3 | 15 | | rm -f /usr/local/bin/nssh |
4 | 16 | | curl -s https://raw.githubusercontent.com/rabbagliettiandrea/nssh/main/nssh > /usr/local/bin/nssh |
5 | 17 | | chmod +x /usr/local/bin/nssh |
| skipped 2 lines |