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
[Service]
User=root
Group=root
WorkingDirectory=%s
EnvironmentFile=%s
ExecStart=%s/pocketbase serve --http="127.0.0.1:${PORT}"
Restart=on-failure
LimitNOFILE=65535
Type = simple
User = root
Group = root
LimitNOFILE = 4096
Restart = always
RestartSec = 5s
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]
WantedBy=multi-user.target
@@ -372,7 +376,7 @@ EOF
systemctl daemon-reload
systemctl enable --now pb@%s
systemctl restart pb@%s
`, serviceDir, envFile, serviceDir, serviceName, serviceName)
`, serviceDir, serviceDir, serviceDir, envFile, serviceDir, serviceName, serviceName)
}
func runSSHCommand(server, script string) error {