feat: update cwctl to work with Ubuntu 24.04 LTS (#9586)
The `add user` utility was updated, and the `--disabled-login` behavior changed in Ubuntu 24.04. This set the login shell to `/sbin/nologin,` which broke the `cwctl` installation flow. ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625758 Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com>
This commit is contained in:
@@ -1 +1 @@
|
||||
3.3.1
|
||||
3.9.0
|
||||
|
||||
@@ -1 +1 @@
|
||||
2.7.0
|
||||
2.8.0
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Description: Install and manage a Chatwoot installation.
|
||||
# OS: Ubuntu 20.04 LTS
|
||||
# Script Version: 2.7.0
|
||||
# OS: Ubuntu 20.04 LTS, 22.04 LTS, 24.04 LTS
|
||||
# Script Version: 2.8.0
|
||||
# Run this script as root
|
||||
|
||||
set -eu -o errexit -o pipefail -o noclobber -o nounset
|
||||
@@ -19,7 +19,7 @@ fi
|
||||
# option --output/-o requires 1 argument
|
||||
LONGOPTS=console,debug,help,install,Install:,logs:,restart,ssl,upgrade,webserver,version
|
||||
OPTIONS=cdhiI:l:rsuwv
|
||||
CWCTL_VERSION="2.7.0"
|
||||
CWCTL_VERSION="2.8.0"
|
||||
pg_pass=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 15 ; echo '')
|
||||
CHATWOOT_HUB_URL="https://hub.2.chatwoot.com/events"
|
||||
|
||||
@@ -231,7 +231,7 @@ function install_webserver() {
|
||||
##############################################################################
|
||||
function create_cw_user() {
|
||||
if ! id -u "chatwoot"; then
|
||||
adduser --disabled-login --gecos "" chatwoot
|
||||
adduser --disabled-password --gecos "" chatwoot
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -505,7 +505,7 @@ EOF
|
||||
fi
|
||||
|
||||
echo -en "\n"
|
||||
read -rp 'Would you like to install Postgres and Redis? (Answer no if you plan to use external services): ' install_pg_redis
|
||||
read -rp 'Would you like to install Postgres and Redis? (Answer no if you plan to use external services)(yes or no): ' install_pg_redis
|
||||
|
||||
echo -en "\n➥ 1/9 Installing dependencies. This takes a while.\n"
|
||||
install_dependencies &>> "${LOG_FILE}"
|
||||
@@ -943,7 +943,7 @@ EOF
|
||||
# None
|
||||
##############################################################################
|
||||
function version() {
|
||||
echo "cwctl v$CWCTL_VERSION beta build"
|
||||
echo "cwctl v$CWCTL_VERSION"
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
|
||||
Reference in New Issue
Block a user