update systemd script
This commit is contained in:
10
setup.go
10
setup.go
@@ -358,13 +358,17 @@ Description=PocketBase instance %%i
|
|||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
Type = simple
|
||||||
User = root
|
User = root
|
||||||
Group = root
|
Group = root
|
||||||
|
LimitNOFILE = 4096
|
||||||
|
Restart = always
|
||||||
|
RestartSec = 5s
|
||||||
|
StandardOutput = append:%s/%%i.log
|
||||||
|
StandardError = append:%s/%%i.log
|
||||||
WorkingDirectory = %s
|
WorkingDirectory = %s
|
||||||
EnvironmentFile = %s
|
EnvironmentFile = %s
|
||||||
ExecStart = %s/pocketbase serve --http="127.0.0.1:${PORT}"
|
ExecStart = %s/pocketbase serve --http="127.0.0.1:${PORT}"
|
||||||
Restart=on-failure
|
|
||||||
LimitNOFILE=65535
|
|
||||||
|
|
||||||
[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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user