update systemd script

This commit is contained in:
2026-01-13 13:20:32 +00:00
parent 156af3d64c
commit 363d5dbdef

View File

@@ -358,13 +358,17 @@ Description=PocketBase instance %%i
After=network.target After=network.target
[Service] [Service]
User=root Type = simple
Group=root User = root
WorkingDirectory=%s Group = root
EnvironmentFile=%s LimitNOFILE = 4096
ExecStart=%s/pocketbase serve --http="127.0.0.1:${PORT}" Restart = always
Restart=on-failure RestartSec = 5s
LimitNOFILE=65535 StandardOutput = append:%s/%%i.log
StandardError = append:%s/%%i.log
WorkingDirectory = %s
EnvironmentFile = %s
ExecStart = %s/pocketbase serve --http="127.0.0.1:${PORT}"
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
@@ -372,7 +376,7 @@ EOF
systemctl daemon-reload systemctl daemon-reload
systemctl enable --now pb@%s systemctl enable --now pb@%s
systemctl restart pb@%s systemctl restart pb@%s
`, serviceDir, envFile, serviceDir, serviceName, serviceName) `, serviceDir, serviceDir, serviceDir, envFile, serviceDir, serviceName, serviceName)
} }
func runSSHCommand(server, script string) error { func runSSHCommand(server, script string) error {