Edit Install/Uninstall scripts; Update README.md

Edited Install and Uninstall scripts to handle both at_telnet_daemon and simpleadmin
This commit is contained in:
iamromulan
2023-09-20 00:35:38 -04:00
parent a7b156ab4e
commit 7f80364ac0
39 changed files with 132 additions and 7 deletions

View File

@@ -0,0 +1,22 @@
#!/bin/bash
# sarav (hello@grity.com)
# convert key=value to json
# Created at Gritfy ( Devops Junction )
#
file_name=$1
last_line=$(wc -l < $file_name)
current_line=0
echo "{"
while read line
do
current_line=$(($current_line + 1))
if [[ $current_line -ne $last_line ]]; then
[ -z "$line" ] && continue
echo $line|awk -F'=' '{ print " \""$1"\" : "$2","}'|grep -iv '\"#'
else
echo $line|awk -F'=' '{ print " \""$1"\" : "$2""}'|grep -iv '\"#'
fi
done < $file_name
echo "}"