From ef14567d874ceac63a0fb35c65d47407f488894b Mon Sep 17 00:00:00 2001 From: pictuga Date: Sat, 8 Jan 2022 16:10:51 +0100 Subject: [PATCH] Handle `morss-helper` with `setup.py` --- .drone.yml | 2 -- README.md | 4 +--- setup.py | 6 ++++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index aa4a788..2e36dd2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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: diff --git a/README.md b/README.md index 837fc38..37cf248 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/setup.py b/setup.py index b284995..c153033 100644 --- a/setup.py +++ b/setup.py @@ -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'], +)