This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Executing command on remote server fails
#5
(17.01.2025, 12:19)admin Wrote: You can run a HTTP server or even a simple TCP server that will forward messages to telegram as needed. You can use any programming language to implement this. Don't forget to run this server automatically when the system starts.

I'm not quite sure I understand. 
Where would I have to run this HTTP server? On the remote server that I now ssh to there runs already an http server. How do I get it to forward messages to telegram? As you can guess I am not familiar with this stuff...

I used to run the following script on this LM before telegram changed their policy (and I could not upgrade the firmware):

Code:
require 'ssl.https'

local telegram_url = 'https://api.telegram.org/mybot/sendMessage?'

local chat_id = 'XXXXX'

function telegram(message)

  local data_str = 'chat_id=' .. chat_id .. '&text=' .. message..''

     local res, code, headers, status = ssl.https.request(telegram_url, data_str)
end
But since that didn' work anymore I started using the other script to run telegram on the remote server and that worked and it still does on my other LM.
Reply


Messages In This Thread
RE: Executing command on remote server fails - by baggins - 17.01.2025, 12:43

Forum Jump: