Handle `morss-helper` with `setup.py`
continuous-integration/drone/push Build is passing Details

master
pictuga 2022-01-08 16:10:51 +01:00
parent fb643f5ef1
commit ef14567d87
3 changed files with 5 additions and 7 deletions

View File

@ -38,7 +38,6 @@ steps:
from_secret: ssh_key
source:
- dist/morss.tar.gz
- morss-helper
target: /home/ubuntu
- name: deploy
@ -54,7 +53,6 @@ steps:
script:
- sudo pip install --upgrade dist/morss.tar.gz[full]
- sudo rm -r dist
- sudo mv morss-helper /usr/local/bin/morss-helper
- sudo morss-helper reload
trigger:

View File

@ -168,7 +168,7 @@ write_files:
permissions: 744
content: |
#!/bin/sh
/usr/local/bin/morss-helper
/usr/local/bin/morss-helper daemon
runcmd:
- source /etc/environment
@ -176,8 +176,6 @@ runcmd:
- iptables -I INPUT 6 -m state --state NEW -p tcp --dport ${PORT:-8000} -j ACCEPT
- netfilter-persistent save
- pip install morss[full]
- python -m morss.crawler https://git.pictuga.com/pictuga/morss/raw/branch/master/morss-helper > /usr/local/bin/morss-helper
- chmod +x /usr/local/bin/morss-helper
```
## Run

View File

@ -32,5 +32,7 @@ setup(
('share/' + package_name + '/www', glob('www/*.*')),
],
entry_points = {
'console_scripts': [package_name + '=' + package_name + '.__main__:main']
})
'console_scripts': [package_name + '=' + package_name + '.__main__:main'],
},
scripts = ['morss-helper'],
)