Stalwart Mail Server is now just Stalwart
This commit is contained in:
@@ -40,12 +40,12 @@ RUN cargo build --manifest-path=crates/main/Cargo.toml --no-default-features --f
|
||||
|
||||
FROM debian:buster-slim AS runtime
|
||||
|
||||
COPY --from=builder /app/target/release/stalwart-mail /usr/local/bin/stalwart-mail
|
||||
COPY --from=builder /app/target/release/stalwart /usr/local/bin/stalwart
|
||||
RUN apt-get update -y && apt-get install -yq ca-certificates
|
||||
RUN curl -LO https://github.com/apple/foundationdb/releases/download/7.1.0/foundationdb-clients_7.1.0-1_amd64.deb && \
|
||||
dpkg -i foundationdb-clients_7.1.0-1_amd64.deb
|
||||
RUN useradd stalwart-mail -s /sbin/nologin -M
|
||||
RUN mkdir -p /opt/stalwart-mail
|
||||
RUN chown stalwart-mail:stalwart-mail /opt/stalwart-mail
|
||||
RUN useradd stalwart -s /sbin/nologin -M
|
||||
RUN mkdir -p /opt/stalwart
|
||||
RUN chown stalwart:stalwart /opt/stalwart
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/stalwart-mail", "--config", "/opt/stalwart-mail/etc/config.toml"]
|
||||
ENTRYPOINT ["/usr/local/bin/stalwart", "--config", "/opt/stalwart/etc/config.toml"]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env sh
|
||||
# shellcheck shell=dash
|
||||
|
||||
# Stalwart Mail Server install script -- based on the rustup installation script.
|
||||
# Stalwart install script -- based on the rustup installation script.
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
readonly BASE_URL="https://github.com/stalwartlabs/mail-server/releases/latest/download"
|
||||
readonly BASE_URL="https://github.com/stalwartlabs/stalwart/releases/latest/download"
|
||||
|
||||
main() {
|
||||
downloader --check
|
||||
@@ -26,16 +26,16 @@ main() {
|
||||
# Detect OS
|
||||
local _os="unknown"
|
||||
local _uname="$(uname)"
|
||||
_account="stalwart-mail"
|
||||
_account="stalwart"
|
||||
if [ "${_uname}" = "Linux" ]; then
|
||||
_os="linux"
|
||||
elif [ "${_uname}" = "Darwin" ]; then
|
||||
_os="macos"
|
||||
_account="_stalwart-mail"
|
||||
_account="_stalwart"
|
||||
fi
|
||||
|
||||
# Default component setting
|
||||
local _component="stalwart-mail"
|
||||
local _component="stalwart"
|
||||
local _dir="/usr/local/bin"
|
||||
|
||||
# Detect platform architecture
|
||||
@@ -45,11 +45,11 @@ main() {
|
||||
|
||||
# Download latest binary
|
||||
say "⏳ Downloading ${_component} for ${_arch}..."
|
||||
local _file="${_dir}/stalwart-mail.tar.gz"
|
||||
local _file="${_dir}/stalwart.tar.gz"
|
||||
local _url="${BASE_URL}/${_component}-${_arch}.tar.gz"
|
||||
ensure downloader "$_url" "$_file" "$_arch"
|
||||
ensure tar zxvf "$_file" -C "$_dir"
|
||||
ignore chmod +x "$_dir/stalwart-mail"
|
||||
ignore chmod +x "$_dir/stalwart"
|
||||
ignore rm "$_file"
|
||||
|
||||
return 0
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
# shellcheck shell=dash
|
||||
|
||||
# If the configuration file does not exist initialize it.
|
||||
if [ ! -f /opt/stalwart-mail/etc/config.toml ]; then
|
||||
/usr/local/bin/stalwart-mail --init /opt/stalwart-mail
|
||||
if [ ! -f /opt/stalwart/etc/config.toml ]; then
|
||||
/usr/local/bin/stalwart --init /opt/stalwart
|
||||
fi
|
||||
|
||||
# If the configuration file exists, start the server.
|
||||
exec /usr/local/bin/stalwart-mail --config /opt/stalwart-mail/etc/config.toml
|
||||
exec /usr/local/bin/stalwart --config /opt/stalwart/etc/config.toml
|
||||
|
||||
Reference in New Issue
Block a user