nextExplorer: disable shell for user; fix version display

This commit is contained in:
vhsdream 2026-01-15 22:50:31 -05:00
parent 15dc08ef04
commit b92931f6ee
2 changed files with 5 additions and 1 deletions

View File

@ -54,6 +54,7 @@ function update_script() {
mv backend/{node_modules,src,package.json} "$APP_DIR" mv backend/{node_modules,src,package.json} "$APP_DIR"
mv frontend/dist/ "$APP_DIR"/src/public mv frontend/dist/ "$APP_DIR"/src/public
chown -R explorer:explorer "$APP_DIR" /etc/nextExplorer chown -R explorer:explorer "$APP_DIR" /etc/nextExplorer
sed -i "\|version|s|$(jq -cr '.version' ${APP_DIR}/package.json)|$(cat ~/.nextexplorer)|" "$APP_DIR"/package.json
msg_ok "Updated nextExplorer" msg_ok "Updated nextExplorer"
msg_info "Starting nextExplorer" msg_info "Starting nextExplorer"

View File

@ -119,8 +119,9 @@ SHARES_ENABLED=true
# SHARES_ALLOW_ANONYMOUS=true # SHARES_ALLOW_ANONYMOUS=true
EOF EOF
chmod 600 /etc/nextExplorer/.env chmod 600 /etc/nextExplorer/.env
$STD useradd -U -s /bin/bash -m -d /home/explorer explorer $STD useradd -U -s /usr/sbin/nologin -m -d /home/explorer explorer
chown -R explorer:explorer "$APP_DIR" /etc/nextExplorer chown -R explorer:explorer "$APP_DIR" /etc/nextExplorer
sed -i "\|version|s|$(jq -cr '.version' ${APP_DIR}/package.json)|$(cat ~/.nextexplorer)|" "$APP_DIR"/package.json
msg_ok "Configured nextExplorer" msg_ok "Configured nextExplorer"
msg_info "Creating nextExplorer Service" msg_info "Creating nextExplorer Service"
@ -131,6 +132,8 @@ After=network.target
[Service] [Service]
Type=simple Type=simple
User=explorer
Group=explorer
WorkingDirectory=/opt/nextExplorer/app WorkingDirectory=/opt/nextExplorer/app
EnvironmentFile=/etc/nextExplorer/.env EnvironmentFile=/etc/nextExplorer/.env
ExecStart=/usr/bin/node ./src/app.js ExecStart=/usr/bin/node ./src/app.js