fix: use gitea.fp-will.xyz instead of raw IP:3000
This commit is contained in:
+11
-3
@@ -30,7 +30,8 @@ const (
|
||||
serviceName = "xboard-node.service"
|
||||
serviceFilePath = "/etc/systemd/system/xboard-node.service"
|
||||
defaultInstallRoot = "/etc/xboard-node"
|
||||
downloadBase = "http://103.112.1.141:3000/will/xboard-node"
|
||||
downloadBase = "https://gitea.fp-will.xyz/will/xboard-node"
|
||||
downloadToken = "cf6634b57d2c60c66030dbb29d77c4ed25370e94"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -599,7 +600,14 @@ func resolveDownloadURL(artifact, version string) string {
|
||||
|
||||
func downloadFile(url, dest string) error {
|
||||
client := &http.Client{Timeout: 120 * time.Second}
|
||||
resp, err := client.Get(url)
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if downloadToken != "" {
|
||||
req.Header.Set("Authorization", "token "+downloadToken)
|
||||
}
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -1155,7 +1163,7 @@ func latestInstanceID(instances []*config.Config) string {
|
||||
func regenerateServiceFile() error {
|
||||
unit := fmt.Sprintf(`[Unit]
|
||||
Description=Xboard Node Backend
|
||||
Documentation=https://github.com/cedar2025/xboard-node
|
||||
Documentation=https://gitea.fp-will.xyz/will/xboard-node
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
|
||||
Reference in New Issue
Block a user