mirror of
https://github.com/sartoopjj/thefeed.git
synced 2026-05-19 09:04:37 +03:00
feat: update allowManage logic to disable via environment variable and clean up install script flags
This commit is contained in:
@@ -64,6 +64,10 @@ func main() {
|
||||
if !*allowManage && os.Getenv("THEFEED_ALLOW_MANAGE") == "1" {
|
||||
*allowManage = true
|
||||
}
|
||||
// THEFEED_ALLOW_MANAGE=0 explicitly disables, even if flag was set
|
||||
if os.Getenv("THEFEED_ALLOW_MANAGE") == "0" {
|
||||
*allowManage = false
|
||||
}
|
||||
if *msgLimit == 15 {
|
||||
if v := os.Getenv("THEFEED_MSG_LIMIT"); v != "" {
|
||||
if n, err := strconv.Atoi(v); err == nil && n > 0 {
|
||||
|
||||
+1
-2
@@ -298,8 +298,7 @@ ExecStart=${INSTALL_DIR}/thefeed-server \\
|
||||
--api-id \${TELEGRAM_API_ID} \\
|
||||
--api-hash \${TELEGRAM_API_HASH} \\
|
||||
--phone \${TELEGRAM_PHONE} \\
|
||||
--listen \${THEFEED_LISTEN} \\
|
||||
--msg-limit \${THEFEED_MSG_LIMIT} ${extra_flags}
|
||||
--listen \${THEFEED_LISTEN} ${extra_flags}
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
Reference in New Issue
Block a user