Closed EliteOfGods closed 3 years ago
This pull request introduces 1 alert when merging 90245b4e50cfe3b8a1e4ae045d88645a71e14c58 into 9086e2f88b29a7b72fddef48c4c726b5fe783284 - view on LGTM.com
new alerts:
This pull request introduces 1 alert when merging 9fa6a8d3976b6235e0cf81d12374ef405b32d904 into 9086e2f88b29a7b72fddef48c4c726b5fe783284 - view on LGTM.com
new alerts:
I don't know if this is the correct way of doing things. I've never coded python in my entire life and I'm just applying a patch that I've found somewhere in the net on how to specify the dir from where the python script is executed. Feel free to make the corrections needed, @vijaiaeroastro
I've tested it on my VPS and it works.
Example:
$ IRCCLOUD_USERNAME="my@email.address" IRCCLOUD_PASSWORD="my_password" python3 /home/irccloud/irccloud/irccloud.py
2021-03-03 04:00:15,238 INFO Successfully obtained authentication token.
2021-03-03 04:00:18,973 INFO Successfully obtained a session id.
2021-03-03 04:00:32,422 INFO IRC Cloud Session is Kept alive.
@EliteOfGods I am gonna have to reject this one. The workflow i put together was for people who didn't know much about Linux. Some random person included the crontab thing which i was never really happy about (i don't really like crontab's). But i left it there simply. From a developer point of view, if someone even has a server and runs Linux on it, my assumption is that they know how to do this stuff on their own. I would much rather not think for such users since they might be able to do so themselves.
Updated the python script to be possible to call it from a crontab like
0 * * * * IRCCLOUD_USERNAME="your@email.address" IRCCLOUD_PASSWORD="your_password" python3 /home/irccloud/irccloud/irccloud.py >/dev/null 2>&1
otherwise it fails opening the user_agents.json and doesn't complete the task.Worth to mention that this doesn't interfere with the
irccloud.py
when called by theirccloud_cronjob
script.