Create the filepaths for the config files. Output the files and their contents after creation.
This commit is contained in:
10
setup.sh
10
setup.sh
@@ -9,6 +9,10 @@ LOCAL=$DIR/local.yml
|
|||||||
URL="https://git.hyperling.com/me/env-ansible"
|
URL="https://git.hyperling.com/me/env-ansible"
|
||||||
BRANCH="main"
|
BRANCH="main"
|
||||||
|
|
||||||
|
general_config="/usr/local/etc/hyperling-scm/general.ini"
|
||||||
|
workstation_config="/usr/local/etc/hyperling-scm/workstation.ini"
|
||||||
|
server_config="/usr/local/etc/hyperling-scm/server.ini"
|
||||||
|
|
||||||
## Functions ##
|
## Functions ##
|
||||||
|
|
||||||
# Accepts 1 parameter, it is used as the exit status.
|
# Accepts 1 parameter, it is used as the exit status.
|
||||||
@@ -135,6 +139,8 @@ if [[ -n "$create_general" && ! -f "$general_config" ]]; then
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
print_general_contents > "$general_config"
|
print_general_contents > "$general_config"
|
||||||
|
ls -lh "$general_config"
|
||||||
|
cat "$general_config"
|
||||||
fi
|
fi
|
||||||
if [[ -n "$create_workstation" && ! -f "$workstation_config" ]]; then
|
if [[ -n "$create_workstation" && ! -f "$workstation_config" ]]; then
|
||||||
function print_workstation_contents {
|
function print_workstation_contents {
|
||||||
@@ -146,6 +152,8 @@ if [[ -n "$create_workstation" && ! -f "$workstation_config" ]]; then
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
print_workstation_contents > "$workstation_config"
|
print_workstation_contents > "$workstation_config"
|
||||||
|
ls -lh "$workstation_config"
|
||||||
|
cat "$workstation_config"
|
||||||
fi
|
fi
|
||||||
if [[ -n "$create_server" && ! -f "$server_config" ]]; then
|
if [[ -n "$create_server" && ! -f "$server_config" ]]; then
|
||||||
function print_server_contents {
|
function print_server_contents {
|
||||||
@@ -154,6 +162,8 @@ if [[ -n "$create_server" && ! -f "$server_config" ]]; then
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
print_server_contents > "$server_config"
|
print_server_contents > "$server_config"
|
||||||
|
ls -lh "$server_config"
|
||||||
|
cat "$server_config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Provisioning Ansible..."
|
echo "Provisioning Ansible..."
|
||||||
|
|||||||
Reference in New Issue
Block a user