aaaaaaaaaaaaaaaaaaaaa
This commit is contained in:
@@ -51,7 +51,7 @@ jobs:
|
|||||||
uses: https://github.com/fifsky/ssh-action@master
|
uses: https://github.com/fifsky/ssh-action@master
|
||||||
with:
|
with:
|
||||||
command: |
|
command: |
|
||||||
cd ${{ env.REPO_NAME }}/lib/bot
|
cd /dev/shm
|
||||||
touch token.0
|
touch token.0
|
||||||
echo ${{ env.BOT_TOKEN }} > token.0
|
echo ${{ env.BOT_TOKEN }} > token.0
|
||||||
echo $?
|
echo $?
|
||||||
@@ -73,11 +73,11 @@ jobs:
|
|||||||
After=multi-user.target
|
After=multi-user.target
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/bin/python3 /home/admin/${{ env.REPO_NAME }}/main.py
|
ExecStart=/usr/bin/python3 /home/binlab/${{ env.REPO_NAME }}/main.py
|
||||||
User=root
|
User=root
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=30
|
RestartSec=30
|
||||||
WorkingDirectory=/home/admin/${{ env.REPO_NAME }}/
|
WorkingDirectory=/home/binlab/${{ env.REPO_NAME }}/
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target" >> /etc/systemd/system/${{ env.REPO_NAME }}.service
|
WantedBy=multi-user.target" >> /etc/systemd/system/${{ env.REPO_NAME }}.service
|
||||||
chmod +x /root/${{ env.REPO_NAME }}/main.py
|
chmod +x /root/${{ env.REPO_NAME }}/main.py
|
||||||
@@ -86,7 +86,7 @@ jobs:
|
|||||||
sudo systemctl start ${{ env.REPO_NAME }}.service
|
sudo systemctl start ${{ env.REPO_NAME }}.service
|
||||||
host: 172.17.0.1
|
host: 172.17.0.1
|
||||||
user: binlab
|
user: binlab
|
||||||
key: ${{ secrets.KEY }}
|
pass: ${{ secrets.KEY }}
|
||||||
|
|
||||||
create-systemctl-restart:
|
create-systemctl-restart:
|
||||||
needs: [create-systemctl-service, add-bot-token, deploy-via-sftp]
|
needs: [create-systemctl-service, add-bot-token, deploy-via-sftp]
|
||||||
@@ -109,4 +109,4 @@ jobs:
|
|||||||
sudo systemctl start ${{ env.REPO_NAME }}-watcher.service
|
sudo systemctl start ${{ env.REPO_NAME }}-watcher.service
|
||||||
host: 172.17.0.1
|
host: 172.17.0.1
|
||||||
user: binlab
|
user: binlab
|
||||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
pass: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
|||||||
Reference in New Issue
Block a user