Update scripts that use read -p (#4498)

This commit is contained in:
Slaviša Arežina
2025-05-15 11:13:57 +02:00
committed by GitHub
parent 59dfdc9af6
commit 62189321cc
44 changed files with 257 additions and 258 deletions

View File

@@ -27,16 +27,16 @@ sed -i '0,/^ExecStart/ { /^ExecStart/ { n; s|^ExecStart.*|ExecStart=/opt/openzit
systemctl daemon-reload
msg_ok "Installed openziti"
read -r -p "Please paste an identity enrollment token(JTW)" prompt
read -r -p "${TAB3}Please paste an identity enrollment token(JTW)" prompt
if [[ ${prompt} ]]; then
msg_info "Adding identity"
echo "${prompt}" >/opt/openziti/etc/identities/identity.jwt
chown ziti:ziti /opt/openziti/etc/identities/identity.jwt
systemctl enable -q --now ziti-edge-tunnel
msg_ok "Service Started"
msg_info "Adding identity"
echo "${prompt}" >/opt/openziti/etc/identities/identity.jwt
chown ziti:ziti /opt/openziti/etc/identities/identity.jwt
systemctl enable -q --now ziti-edge-tunnel
msg_ok "Service Started"
else
systemctl enable -q ziti-edge-tunnel
msg_error "No identity provided; please place an identity file in /opt/openziti/etc/identities/ and restart the service"
systemctl enable -q ziti-edge-tunnel
msg_error "No identity provided; please place an identity file in /opt/openziti/etc/identities/ and restart the service"
fi
motd_ssh