Removing autostart from configuration

This commit is contained in:
Farhan Khan 2021-12-11 00:53:43 -05:00
parent b42701e4ef
commit a9a55719aa
3 changed files with 2 additions and 21 deletions

View File

@ -33,7 +33,6 @@ type Proxy struct {
// Settings - Configuration file structure
type Settings struct {
Autostart []string `"json:autostart"`
Crawl bool `"json:crawl"`
Banned []string `"json:banned"`
Alwaysbot []string `"json:alwaysbot"`

View File

@ -4,16 +4,6 @@
* https://github.com/neoclide/jsonc.vim
*/
{
/*
* Automatically start following the following instances's public timeline
* If an external account with the same endpoint exists, the autostart
* will use the authenticated to follow
*/
"autostart": [
"mastodon.social",
"pleroma.site"
],
// Should pollers automatically crawl
"crawl": true,

View File

@ -95,20 +95,12 @@ func main() {
var endpoint string
err = rows.Scan(&endpoint)
if err != nil {
logErr("Unable to iterate")
logErr("Unable to iterate database, exiting.")
return
}
_, exists := GetRunner(endpoint)
if exists == false {
go StartInstance(endpoint)
}
}
// Start from Autostart list
for _, endpoint := range settings.Autostart {
logInfo("Autostarting " + endpoint)
_, exists := GetRunner(endpoint)
if exists == false {
go StartInstance(endpoint)
}
}