mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Major cleanup of roles/openvpn, openvpn_handle SSOT
This commit is contained in:
parent
d01a31d457
commit
011139bde6
18 changed files with 268 additions and 86 deletions
|
@ -19,7 +19,7 @@ echo -e " sudo iiab-diagnostics PATH/FILE1 PATH/FILE2 ... # COMPLETE RESU
|
|||
echo
|
||||
echo -ne "Can you provide a \e[1mshort public nickname:\e[0m (no spaces!) "
|
||||
read nickname < /dev/tty
|
||||
if [ -z "$nickname" ]; then
|
||||
if [ "$nickname" = "" ]; then
|
||||
nickname="NONAME"
|
||||
fi
|
||||
|
||||
|
@ -87,9 +87,13 @@ function cat_cmd() { # $1 = command + params, $2 = explan
|
|||
echo "=IIAB==========================================================================" >> $outfile
|
||||
cmd=$(echo "$1" | sed 's/\s.*$//') # Keep command on left; Drop params on right
|
||||
pth=$(which $cmd | sed 's/[^/]*$//') # Keep only path on left; Drop command on right
|
||||
echo "COMMAND: $pth$1 # $2" >> $outfile
|
||||
if [ "$2" = "" ]; then
|
||||
echo "COMMAND: $pth$1" >> $outfile
|
||||
else
|
||||
echo "COMMAND: $pth$1 # $2" >> $outfile
|
||||
fi
|
||||
echo >> $outfile
|
||||
if [ -z "$pth" ]; then
|
||||
if [ "$pth" = "" ]; then
|
||||
echo "COMMAND NOT FOUND: $1" >> $outfile
|
||||
else
|
||||
$(echo "eval $1") >> $outfile # eval is nec within backticks, so | (pipes) work: https://stackoverflow.com/a/7184782
|
||||
|
@ -151,7 +155,7 @@ echo -e "\n\n\n\n2. REGULAR FILES\n" >> $outfile
|
|||
#cat_file /opt/iiab/iiab # Directory test
|
||||
#cat_file /tmp/empty-file # Empty file test
|
||||
#cat_file /usr/bin/iiab-support-on # Symlink test
|
||||
cat_file /etc/iiab/openvpn_handle
|
||||
cat_cmd 'grep "^openvpn_" /etc/iiab/local_vars.yml'
|
||||
cat_file /.iiab-image
|
||||
cat_file /etc/iiab/iiab.env
|
||||
cat_file /etc/iiab/iiab.ini
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue