linux - include bwcli in /usr/local/bin
This commit is contained in:
parent
40007b0866
commit
c0a8a356c2
|
@ -2,8 +2,8 @@
|
|||
|
||||
## v1.4.2 -
|
||||
|
||||
- Fix missing bwcli command with Linux integration
|
||||
- Fix various bugs with jobs scheduler when using autoconf/swarm/k8s
|
||||
- Fix wrong env file when running jobs using Linux integration
|
||||
- Fix bwcli unban command when using Linux integration
|
||||
- Fix permissions check when filename has a space
|
||||
- Fix static config (SERVER_NAME not empty) support when using autoconf/swarm/k8s
|
||||
|
|
|
@ -7,7 +7,7 @@ sys.path.append("/opt/bunkerweb/utils")
|
|||
from requests import get
|
||||
from zipfile import ZipFile
|
||||
from io import BytesIO
|
||||
from os import getenv, makedirs, chmod, stat
|
||||
from os import getenv, makedirs, chmod, stat, _exit
|
||||
from os.path import isfile, dirname
|
||||
from stat import S_IEXEC
|
||||
from uuid import uuid4
|
||||
|
@ -42,6 +42,7 @@ try :
|
|||
plugin_urls = getenv("EXTERNAL_PLUGIN_URLS", "")
|
||||
if plugin_urls == "" :
|
||||
log("JOBS", "ℹ️", "No external plugins to download")
|
||||
_exit(0)
|
||||
|
||||
# Loop on URLs
|
||||
for plugin_url in plugin_urls.split(" ") :
|
||||
|
|
|
@ -18,9 +18,9 @@ Here is the list of "official" plugins that we maintain (see the [bunkerweb-plug
|
|||
|
||||
### Automatic
|
||||
|
||||
If you want to quickly install external plugins, you can use the `EXTERNAL_PLUGIN_URLS` setting. It takes a list of URLs, separated with space, pointing to compressed (zip format) archives containing one or more plugin(s).
|
||||
If you want to quickly install external plugins, you can use the `EXTERNAL_PLUGIN_URLS` setting. It takes a list of URLs, separated with space, pointing to compressed (zip format) archive containing one or more plugin(s).
|
||||
|
||||
Just use the following value if you want to automatically install the official plugins : `EXTERNAL_PLUGIN_URLS=https://github.com/bunkerity/bunkerweb-plugins/archive/refs/tags/v0.2.zip`
|
||||
You can use the following value if you want to automatically install the official plugins : `EXTERNAL_PLUGIN_URLS=https://github.com/bunkerity/bunkerweb-plugins/archive/refs/tags/v0.2.zip`
|
||||
|
||||
### Manual
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ COPY VERSION /opt/bunkerweb/VERSION
|
|||
|
||||
# Setup BW
|
||||
RUN cp /opt/bunkerweb/helpers/bwcli /usr/local/bin && \
|
||||
chmod 755 /usr/local/bin/bwcli && \
|
||||
mkdir /opt/bunkerweb/configs && \
|
||||
mkdir /opt/bunkerweb/cache && \
|
||||
mkdir /opt/bunkerweb/plugins && \
|
||||
|
@ -49,7 +50,7 @@ RUN cp /opt/bunkerweb/helpers/bwcli /usr/local/bin && \
|
|||
find /opt/bunkerweb -path /opt/bunkerweb/deps -prune -o -type f -exec chmod 0740 {} \; && \
|
||||
find /opt/bunkerweb -path /opt/bunkerweb/deps -prune -o -type d -exec chmod 0750 {} \; && \
|
||||
chmod 770 /opt/bunkerweb/cache /opt/bunkerweb/tmp && \
|
||||
chmod 750 /opt/bunkerweb/gen/main.py /opt/bunkerweb/job/main.py /opt/bunkerweb/cli/main.py /opt/bunkerweb/helpers/*.sh /usr/local/bin/bwcli /opt/bunkerweb/ui/main.py && \
|
||||
chmod 750 /opt/bunkerweb/gen/main.py /opt/bunkerweb/job/main.py /opt/bunkerweb/cli/main.py /opt/bunkerweb/helpers/*.sh /opt/bunkerweb/ui/main.py && \
|
||||
find /opt/bunkerweb/core/*/jobs/* -type f -exec chmod 750 {} \; && \
|
||||
pip3.9 install --no-cache-dir --target /opt/bunkerweb/deps/python -r /opt/bunkerweb/ui/requirements.txt
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ COPY VERSION /opt/bunkerweb/VERSION
|
|||
|
||||
# Setup BW
|
||||
RUN cp /opt/bunkerweb/helpers/bwcli /usr/local/bin && \
|
||||
chmod 755 /usr/local/bin/bwcli && \
|
||||
mkdir /opt/bunkerweb/configs && \
|
||||
mkdir /opt/bunkerweb/cache && \
|
||||
mkdir /opt/bunkerweb/plugins && \
|
||||
|
@ -53,7 +54,7 @@ RUN cp /opt/bunkerweb/helpers/bwcli /usr/local/bin && \
|
|||
find /opt/bunkerweb -path /opt/bunkerweb/deps -prune -o -type f -exec chmod 0740 {} \; && \
|
||||
find /opt/bunkerweb -path /opt/bunkerweb/deps -prune -o -type d -exec chmod 0750 {} \; && \
|
||||
chmod 770 /opt/bunkerweb/cache /opt/bunkerweb/tmp && \
|
||||
chmod 750 /opt/bunkerweb/gen/main.py /opt/bunkerweb/job/main.py /opt/bunkerweb/cli/main.py /opt/bunkerweb/helpers/*.sh /usr/local/bin/bwcli /opt/bunkerweb/ui/main.py && \
|
||||
chmod 750 /opt/bunkerweb/gen/main.py /opt/bunkerweb/job/main.py /opt/bunkerweb/cli/main.py /opt/bunkerweb/helpers/*.sh /opt/bunkerweb/ui/main.py && \
|
||||
find /opt/bunkerweb/core/*/jobs/* -type f -exec chmod 750 {} \; && \
|
||||
pip install --no-cache-dir --target /opt/bunkerweb/deps/python -r /opt/bunkerweb/ui/requirements.txt
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ COPY VERSION /opt/bunkerweb/VERSION
|
|||
|
||||
# Setup BW
|
||||
RUN cp /opt/bunkerweb/helpers/bwcli /usr/local/bin && \
|
||||
chmod 755 /usr/local/bin/bwcli && \
|
||||
mkdir /opt/bunkerweb/configs && \
|
||||
mkdir /opt/bunkerweb/cache && \
|
||||
mkdir /opt/bunkerweb/plugins && \
|
||||
|
@ -48,7 +49,7 @@ RUN cp /opt/bunkerweb/helpers/bwcli /usr/local/bin && \
|
|||
find /opt/bunkerweb -path /opt/bunkerweb/deps -prune -o -type f -exec chmod 0740 {} \; && \
|
||||
find /opt/bunkerweb -path /opt/bunkerweb/deps -prune -o -type d -exec chmod 0750 {} \; && \
|
||||
chmod 770 /opt/bunkerweb/cache /opt/bunkerweb/tmp && \
|
||||
chmod 750 /opt/bunkerweb/gen/main.py /opt/bunkerweb/job/main.py /opt/bunkerweb/cli/main.py /opt/bunkerweb/helpers/*.sh /usr/local/bin/bwcli /opt/bunkerweb/ui/main.py && \
|
||||
chmod 750 /opt/bunkerweb/gen/main.py /opt/bunkerweb/job/main.py /opt/bunkerweb/cli/main.py /opt/bunkerweb/helpers/*.sh /opt/bunkerweb/ui/main.py && \
|
||||
find /opt/bunkerweb/core/*/jobs/* -type f -exec chmod 750 {} \; && \
|
||||
pip install --no-cache-dir --target /opt/bunkerweb/deps/python -r /opt/bunkerweb/ui/requirements.txt
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ COPY VERSION /opt/bunkerweb/VERSION
|
|||
|
||||
# Setup BW
|
||||
RUN cp /opt/bunkerweb/helpers/bwcli /usr/local/bin && \
|
||||
chmod 755 /usr/local/bin/bwcli && \
|
||||
mkdir /opt/bunkerweb/configs && \
|
||||
mkdir /opt/bunkerweb/cache && \
|
||||
mkdir /opt/bunkerweb/plugins && \
|
||||
|
@ -53,7 +54,7 @@ RUN cp /opt/bunkerweb/helpers/bwcli /usr/local/bin && \
|
|||
find /opt/bunkerweb -path /opt/bunkerweb/deps -prune -o -type f -exec chmod 0740 {} \; && \
|
||||
find /opt/bunkerweb -path /opt/bunkerweb/deps -prune -o -type d -exec chmod 0750 {} \; && \
|
||||
chmod 770 /opt/bunkerweb/cache /opt/bunkerweb/tmp && \
|
||||
chmod 750 /opt/bunkerweb/gen/main.py /opt/bunkerweb/job/main.py /opt/bunkerweb/cli/main.py /opt/bunkerweb/helpers/*.sh /usr/local/bin/bwcli /opt/bunkerweb/ui/main.py && \
|
||||
chmod 750 /opt/bunkerweb/gen/main.py /opt/bunkerweb/job/main.py /opt/bunkerweb/cli/main.py /opt/bunkerweb/helpers/*.sh /opt/bunkerweb/ui/main.py && \
|
||||
find /opt/bunkerweb/core/*/jobs/* -type f -exec chmod 750 {} \; && \
|
||||
pip install --no-cache-dir --target /opt/bunkerweb/deps/python -r /opt/bunkerweb/ui/requirements.txt
|
||||
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
--after-install /opt/bunkerweb/scripts/postinstall.sh
|
||||
--before-remove /opt/bunkerweb/scripts/beforeRemove.sh
|
||||
--after-remove /opt/bunkerweb/scripts/afterRemove.sh
|
||||
/opt/bunkerweb/=/opt/bunkerweb/ bunkerweb.service=/etc/systemd/system/bunkerweb.service bunkerweb-ui.service=/etc/systemd/system/bunkerweb-ui.service
|
||||
/opt/bunkerweb/=/opt/bunkerweb/ bunkerweb.service=/etc/systemd/system/bunkerweb.service bunkerweb-ui.service=/etc/systemd/system/bunkerweb-ui.service /usr/local/bin/bwcli=/usr/local/bin/bwcli
|
|
@ -10,4 +10,4 @@
|
|||
--after-install /opt/bunkerweb/scripts/postinstall.sh
|
||||
--before-remove /opt/bunkerweb/scripts/beforeRemove.sh
|
||||
--after-remove /opt/bunkerweb/scripts/afterRemove.sh
|
||||
/opt/bunkerweb/=/opt/bunkerweb/ bunkerweb.service=/etc/systemd/system/bunkerweb.service bunkerweb-ui.service=/etc/systemd/system/bunkerweb-ui.service
|
||||
/opt/bunkerweb/=/opt/bunkerweb/ bunkerweb.service=/etc/systemd/system/bunkerweb.service bunkerweb-ui.service=/etc/systemd/system/bunkerweb-ui.service /usr/local/bin/bwcli=/usr/local/bin/bwcli
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
--after-install /opt/bunkerweb/scripts/postinstall.sh
|
||||
--before-remove /opt/bunkerweb/scripts/beforeRemove.sh
|
||||
--after-remove /opt/bunkerweb/scripts/afterRemove.sh
|
||||
/opt/bunkerweb/=/opt/bunkerweb/ bunkerweb.service=/etc/systemd/system/bunkerweb.service bunkerweb-ui.service=/etc/systemd/system/bunkerweb-ui.service
|
||||
/opt/bunkerweb/=/opt/bunkerweb/ bunkerweb.service=/etc/systemd/system/bunkerweb.service bunkerweb-ui.service=/etc/systemd/system/bunkerweb-ui.service /usr/local/bin/bwcli=/usr/local/bin/bwcli
|
|
@ -10,4 +10,4 @@
|
|||
--after-install /opt/bunkerweb/scripts/postinstall.sh
|
||||
--before-remove /opt/bunkerweb/scripts/beforeRemove.sh
|
||||
--after-remove /opt/bunkerweb/scripts/afterRemove.sh
|
||||
/opt/bunkerweb/=/opt/bunkerweb/ bunkerweb.service=/etc/systemd/system/bunkerweb.service bunkerweb-ui.service=/etc/systemd/system/bunkerweb-ui.service
|
||||
/opt/bunkerweb/=/opt/bunkerweb/ bunkerweb.service=/etc/systemd/system/bunkerweb.service bunkerweb-ui.service=/etc/systemd/system/bunkerweb-ui.service /usr/local/bin/bwcli=/usr/local/bin/bwcli
|
||||
|
|
|
@ -91,7 +91,7 @@ function start() {
|
|||
# STEP4 #
|
||||
# Run jobs script #
|
||||
#############################################
|
||||
/opt/bunkerweb/job/main.py --variables /opt/bunkerweb/variables.env --run
|
||||
/opt/bunkerweb/job/main.py --variables /etc/nginx/variables.env --run
|
||||
# Test if command worked
|
||||
check_ok
|
||||
# Exit if failed
|
||||
|
|
Loading…
Reference in New Issue