fix(installer): restore service user creation and SUDO variable
This commit is contained in:
parent
aefffb70db
commit
4f4a00757e
1 changed files with 6 additions and 0 deletions
|
|
@ -17,6 +17,12 @@ header() { echo -e "\n${BOLD}${CYAN}$1${NC}"; }
|
|||
# ============================================================
|
||||
SVC_USER="nextwks"
|
||||
|
||||
# Create service user if needed, and set sudo wrapper
|
||||
if ! id "$SVC_USER" &>/dev/null; then
|
||||
useradd -r -s /usr/sbin/nologin -d /nonexistent "$SVC_USER" 2>/dev/null || true
|
||||
fi
|
||||
[ "$EUID" -eq 0 ] && SUDO="" || SUDO="sudo"
|
||||
|
||||
# ============================================================
|
||||
# PATHS
|
||||
# ============================================================
|
||||
|
|
|
|||
Loading…
Reference in a new issue