优化硬盘识别
This commit is contained in:
14
install.sh
14
install.sh
@@ -66,7 +66,7 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
|
||||
# 7. Create Systemd Service File
|
||||
SERVICE_FILE="/etc/systemd/system/data-wall.service"
|
||||
SERVICE_FILE="/etc/systemd/system/promdatapanel.service"
|
||||
NODE_PATH=$(command -v node)
|
||||
|
||||
echo -e "${BLUE}Creating systemd service at $SERVICE_FILE... (May require password)${NC}"
|
||||
@@ -85,7 +85,7 @@ Restart=always
|
||||
RestartSec=10
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=data-wall
|
||||
SyslogIdentifier=promdatapanel
|
||||
# Pass environment via .env file injection
|
||||
EnvironmentFile=-$PROJECT_DIR/.env
|
||||
Environment=NODE_ENV=production
|
||||
@@ -102,21 +102,21 @@ EOF"
|
||||
# 8. Reload Systemd and Start
|
||||
echo -e "${BLUE}Reloading systemd and restarting service... (May require password)${NC}"
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable data-wall
|
||||
sudo systemctl restart data-wall
|
||||
sudo systemctl enable promdatapanel
|
||||
sudo systemctl restart promdatapanel
|
||||
|
||||
# 9. Check Status
|
||||
echo -e "${BLUE}Checking service status...${NC}"
|
||||
sleep 2
|
||||
if sudo systemctl is-active --quiet data-wall; then
|
||||
if sudo systemctl is-active --quiet promdatapanel; then
|
||||
echo -e "${GREEN}SUCCESS: Service is now running.${NC}"
|
||||
PORT=$(grep "^PORT=" .env | cut -d'=' -f2)
|
||||
PORT=${PORT:-3000}
|
||||
echo -e "Dashboard URL: ${YELLOW}http://localhost:${PORT}${NC}"
|
||||
echo -e "View logs: ${BLUE}journalctl -u data-wall -f${NC}"
|
||||
echo -e "View logs: ${BLUE}journalctl -u promdatapanel -f${NC}"
|
||||
else
|
||||
echo -e "${RED}FAILED: Service failed to start.${NC}"
|
||||
echo -e "Check logs with: ${BLUE}journalctl -u data-wall -xe${NC}"
|
||||
echo -e "Check logs with: ${BLUE}journalctl -u promdatapanel -xe${NC}"
|
||||
fi
|
||||
|
||||
# 10. Reverse Proxy Configuration
|
||||
|
||||
Reference in New Issue
Block a user