update systemd script
This commit is contained in:
20
setup.go
20
setup.go
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user