fix: both services run as dedicated nextwks user, remove SYS_HOME cruft
This commit is contained in:
parent
7b3ba23c82
commit
3589cfd280
1 changed files with 0 additions and 20 deletions
20
install.sh
20
install.sh
|
|
@ -16,26 +16,6 @@ header() { echo -e "\n${BOLD}${CYAN}$1${NC}"; }
|
|||
# SERVICE USER
|
||||
# ============================================================
|
||||
SVC_USER="nextwks"
|
||||
SYS_HOME="/home/${SVC_USER}"
|
||||
|
||||
# Create service user if needed
|
||||
if ! id "$SVC_USER" &>/dev/null; then
|
||||
info "Creating service user: $SVC_USER"
|
||||
useradd -r -s /usr/sbin/nologin -d /nonexistent "$SVC_USER" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Sudo only if not root
|
||||
[ "$EUID" -eq 0 ] && SUDO="" || SUDO="sudo"
|
||||
|
||||
# ============================================================
|
||||
# PATHS
|
||||
# ============================================================
|
||||
REPO_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
INSTALL_DIR="/opt/nextwks"
|
||||
BIN_DIR="${INSTALL_DIR}/bin"
|
||||
DATA_DIR="${INSTALL_DIR}/data"
|
||||
STATIC_DIR="${INSTALL_DIR}/static"
|
||||
CONFIG_FILE="${INSTALL_DIR}/config.yaml"
|
||||
ENV_FILE="${REPO_DIR}/.env"
|
||||
AUTHELIA_DIR="/opt/authelia"
|
||||
AUTHELIA_CONFIG="${AUTHELIA_DIR}/configuration.yml"
|
||||
|
|
|
|||
Loading…
Reference in a new issue