mirror of
https://github.com/go-i2p/reseed-tools.git
synced 2025-09-12 11:47:44 -04:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f89dd04d13 | ||
![]() |
7b5270eb70 | ||
![]() |
1f31b5551b | ||
![]() |
fbeb8c43b3 |
8
Makefile
8
Makefile
@@ -1,5 +1,5 @@
|
||||
|
||||
VERSION=0.2.32
|
||||
VERSION=0.2.33
|
||||
APP=reseed-tools
|
||||
USER_GH=eyedeekay
|
||||
CGO_ENABLED=0
|
||||
@@ -46,7 +46,7 @@ install:
|
||||
mkdir -p /var/lib/i2p/
|
||||
mkdir -p /var/lib/i2p/i2p-config/reseed/
|
||||
install -g i2psvc -o i2psvc -d /var/lib/i2p/i2p-config/reseed/
|
||||
cp -r content /var/lib/i2p/i2p-config/reseed/content
|
||||
cp -r reseed/content /var/lib/i2p/i2p-config/reseed/content
|
||||
chown -R i2psvc:i2psvc /var/lib/i2p/i2p-config/reseed/
|
||||
install -m644 etc/systemd/system/reseed.service.d/override.conf /etc/systemd/system/reseed.service.d/override.conf
|
||||
install -m644 etc/systemd/system/reseed.service /etc/systemd/system/reseed.service
|
||||
@@ -269,7 +269,7 @@ upload-single-su3:
|
||||
|
||||
tmp/content:
|
||||
mkdir -p tmp
|
||||
cp -rv content tmp/content
|
||||
cp -rv reseed/content tmp/content
|
||||
echo "you@mail.i2p" > tmp/signer
|
||||
|
||||
tmp/lib:
|
||||
@@ -282,7 +282,7 @@ tmp/LICENSE:
|
||||
SIGNER_DIR=$(HOME)/i2p-go-keys/
|
||||
|
||||
su3s: tmp/content tmp/lib tmp/LICENSE build
|
||||
rm -f plugin.yaml
|
||||
rm -f plugin.yaml client.yaml
|
||||
i2p.plugin.native -name=reseed-tools-$(GOOS)-$(GOARCH) \
|
||||
-signer=hankhill19580@gmail.com \
|
||||
-signer-dir=$(SIGNER_DIR) \
|
||||
|
2
main.go
2
main.go
@@ -19,7 +19,7 @@ func main() {
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Name = "reseed-tools"
|
||||
app.Version = "0.2.32"
|
||||
app.Version = "0.2.33"
|
||||
app.Usage = "I2P tools and reseed server"
|
||||
auth := &cli.Author{
|
||||
Name: "eyedeekay",
|
||||
|
@@ -97,7 +97,20 @@ var AllReseeds = []string{
|
||||
"https://www2.mk16.de/",
|
||||
}
|
||||
|
||||
func yday() time.Time {
|
||||
today := time.Now()
|
||||
yesterday := today.Add(-24 * time.Hour)
|
||||
return yesterday
|
||||
}
|
||||
|
||||
var lastPing = yday()
|
||||
|
||||
func PingEverybody() []string {
|
||||
if lastPing.After(yday()) {
|
||||
log.Println("Your ping was rate-limited")
|
||||
return nil
|
||||
}
|
||||
lastPing = time.Now()
|
||||
var nonerrs []string
|
||||
for _, urlInput := range AllReseeds {
|
||||
err := PingWriteContent(urlInput)
|
||||
|
Reference in New Issue
Block a user