- add stalwart: main mail server with systemd integration and user management - add stalwart-cli: command line interface tool for server administration - add stalwart-foundationdb: FoundationDB-enabled version with proper dependencies - add libfoundationdb: FoundationDB client library (libfdb_c.so) package All packages include proper conflict resolution, systemd services, and follow repository packaging conventions. stalwart and stalwart-foundationdb are mutually exclusive to prevent installation conflicts.
20 lines
546 B
Bash
20 lines
546 B
Bash
#!/usr/bin/env bash
|
|
|
|
# Create stalwart user and group
|
|
if ! getent group stalwart >/dev/null; then
|
|
groupadd -r stalwart
|
|
fi
|
|
|
|
if ! getent passwd stalwart >/dev/null; then
|
|
useradd -r -g stalwart -d /opt/stalwart -s /sbin/nologin -c "Stalwart Mail Server" stalwart
|
|
fi
|
|
|
|
# Create required directories
|
|
mkdir -p /opt/stalwart/{bin,etc,data,logs}
|
|
mkdir -p /var/lib/stalwart
|
|
mkdir -p /var/log/stalwart
|
|
|
|
# Set ownership
|
|
chown -R stalwart:stalwart /opt/stalwart
|
|
chown -R stalwart:stalwart /var/lib/stalwart
|
|
chown -R stalwart:stalwart /var/log/stalwart |