File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed
Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 4545 run : ssh ${{ secrets.JBOND_SSH_USER }}@${{ secrets.JBOND_SSH_HOST }} "cp -f $DIRECTORY/misc/jbond.service /usr/lib/systemd/system/"
4646 - name : replace service
4747 run : ssh ${{ secrets.JBOND_SSH_USER }}@${{ secrets.JBOND_SSH_HOST }} "systemctl daemon-reload && systemctl enable jbond.service && systemctl restart jbond.service"
48- - name : restart cron
48+ - name : setup logrotate
4949 run : ssh ${{ secrets.JBOND_SSH_USER }}@${{ secrets.JBOND_SSH_HOST }} "cp -f $DIRECTORY/misc/jbond_logrotate /etc/logrotate.d/ && systemctl restart crond"
5050 - name : set token
5151 run : ssh ${{ secrets.JBOND_SSH_USER }}@${{ secrets.JBOND_SSH_HOST }} "echo ${{ secrets.JBOND_BOT_TOKEN }} > $DIRECTORY/token"
Original file line number Diff line number Diff line change 1+ token
12# Byte-compiled / optimized / DLL files
23__pycache__ /
34* .py [cod ]
@@ -174,9 +175,9 @@ cython_debug/
174175.abstra /
175176
176177# Visual Studio Code
177- # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
178+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
178179# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
179- # and can be added to the global gitignore or merged into this file. However, if you prefer,
180+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
180181# you could uncomment the following to ignore the enitre vscode folder
181182# .vscode/
182183
Original file line number Diff line number Diff line change 1414# signal.signal(signal.SIGINT, signal_handler)
1515
1616
17- bot = Bot (token = os .environ .get ('JBOND_BOT_TOKEN' ))
17+ with open ("/opt/jbond/token" , 'r' ) as token :
18+ bot = Bot (token = token .readline ().strip ())
19+
1820dispatcher = Dispatcher (storage = MemoryStorage ())
1921
2022
Original file line number Diff line number Diff line change @@ -15,5 +15,4 @@ async def main():
1515 await dispatcher .start_polling (bot )
1616
1717if __name__ == "__main__" :
18- logger .info (f"JBOND_BOT_TOKEN={ os .environ .get ('JBOND_BOT_TOKEN' )} " )
1918 asyncio .run (main ())
You can’t perform that action at this time.
0 commit comments