fix: non-zero exit on --logs and handle no opts (#5006)
* fix: non-zero exit on --logs and handle no opts * chore: update cwctl version + add utm_source
This commit is contained in:
parent
49d08a6773
commit
1bb9556c86
2 changed files with 10 additions and 9 deletions
|
@ -1 +1 @@
|
||||||
2.0.7
|
2.0.8
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Description: Install and manage a Chatwoot installation.
|
# Description: Install and manage a Chatwoot installation.
|
||||||
# OS: Ubuntu 20.04 LTS
|
# OS: Ubuntu 20.04 LTS
|
||||||
# Script Version: 2.0.7
|
# Script Version: 2.0.8
|
||||||
# Run this script as root
|
# Run this script as root
|
||||||
|
|
||||||
set -eu -o errexit -o pipefail -o noclobber -o nounset
|
set -eu -o errexit -o pipefail -o noclobber -o nounset
|
||||||
|
@ -19,11 +19,11 @@ fi
|
||||||
# option --output/-o requires 1 argument
|
# option --output/-o requires 1 argument
|
||||||
LONGOPTS=console,debug,help,install:,logs:,restart,ssl,upgrade,webserver,version
|
LONGOPTS=console,debug,help,install:,logs:,restart,ssl,upgrade,webserver,version
|
||||||
OPTIONS=cdhi:l:rsuwv
|
OPTIONS=cdhi:l:rsuwv
|
||||||
CWCTL_VERSION="2.0.7"
|
CWCTL_VERSION="2.0.8"
|
||||||
pg_pass=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 15 ; echo '')
|
pg_pass=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 15 ; echo '')
|
||||||
|
|
||||||
# if user does not specify an option
|
# if user does not specify an option
|
||||||
if [ -z "$1" ]; then
|
if [ "$#" -eq 0 ]; then
|
||||||
echo "No options specified. Use --help to learn more."
|
echo "No options specified. Use --help to learn more."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -436,7 +436,7 @@ function ssl_success_message() {
|
||||||
Woot! Woot!! Chatwoot server installation is complete.
|
Woot! Woot!! Chatwoot server installation is complete.
|
||||||
The server will be accessible at https://$domain_name
|
The server will be accessible at https://$domain_name
|
||||||
|
|
||||||
Join the community at https://chatwoot.com/community
|
Join the community at https://chatwoot.com/community?utm_source=cwctl
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
@ -546,9 +546,9 @@ Woot! Woot!! Chatwoot server installation is complete.
|
||||||
The server will be accessible at http://$public_ip:3000
|
The server will be accessible at http://$public_ip:3000
|
||||||
|
|
||||||
To configure a domain and SSL certificate, follow the guide at
|
To configure a domain and SSL certificate, follow the guide at
|
||||||
https://www.chatwoot.com/docs/deployment/deploy-chatwoot-in-linux-vm
|
https://www.chatwoot.com/docs/deployment/deploy-chatwoot-in-linux-vm?utm_source=cwctl
|
||||||
|
|
||||||
Join the community at https://chatwoot.com/community
|
Join the community at https://chatwoot.com/community?utm_source=cwctl
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
@ -634,7 +634,7 @@ Exit status:
|
||||||
Returns 0 if successful; non-zero otherwise.
|
Returns 0 if successful; non-zero otherwise.
|
||||||
|
|
||||||
Report bugs at https://github.com/chatwoot/chatwoot/issues
|
Report bugs at https://github.com/chatwoot/chatwoot/issues
|
||||||
Get help, https://chatwoot.com/community
|
Get help, https://chatwoot.com/community?utm_source=cwctl
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
@ -651,7 +651,8 @@ EOF
|
||||||
function get_logs() {
|
function get_logs() {
|
||||||
if [ "$SERVICE" == "worker" ]; then
|
if [ "$SERVICE" == "worker" ]; then
|
||||||
journalctl -u chatwoot-worker.1.service -f
|
journalctl -u chatwoot-worker.1.service -f
|
||||||
else
|
fi
|
||||||
|
if [ "$SERVICE" == "web" ]; then
|
||||||
journalctl -u chatwoot-web.1.service -f
|
journalctl -u chatwoot-web.1.service -f
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue