#8: Force dos2unix on blacklist.txt
grep cannot deal with CRLF line endings
This commit is contained in:
parent
a8492ad00b
commit
b430e7975f
|
@ -1,7 +1,7 @@
|
|||
FROM php:5.6-alpine
|
||||
ARG S6_OVERLAY_VERSION=3.1.1.1
|
||||
ARG S6_OVERLAY_VERSION=3.2.0.2
|
||||
|
||||
RUN apk add --no-cache pwgen gettext xmlstarlet bash xz
|
||||
RUN apk add --no-cache pwgen gettext xmlstarlet bash xz dos2unix
|
||||
RUN docker-php-ext-install mysql
|
||||
|
||||
COPY tmserver/ /var/lib/tmserver
|
||||
|
|
|
@ -208,11 +208,11 @@ They will be linked down to the plugins folder.
|
|||
|
||||
### Plugin blacklist
|
||||
|
||||
Create a file called `blacklist` and list plugins by filename that you want ignored on
|
||||
Create a file called `blacklist.txt` and list plugins by filename that you want ignored on
|
||||
XAseco's boot.
|
||||
Mount this file at `/var/lib/xaseco/blacklist`.
|
||||
Mount this file at `/var/lib/xaseco/blacklist.txt`.
|
||||
|
||||
blacklist:
|
||||
blacklist.txt:
|
||||
```
|
||||
jfreu.chat.php
|
||||
jfreu.plugin.php
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
services:
|
||||
tmserver:
|
||||
image: fanyx/tmserver:2.2.0
|
||||
image: fanyx/tmserver:2.2.1
|
||||
container_name: trackmania_tmserver
|
||||
depends_on:
|
||||
- db
|
||||
|
@ -9,7 +9,7 @@ services:
|
|||
volumes:
|
||||
- ./tracks:/var/lib/tmserver/GameData/Tracks/Challenges/Custom # => Custom tracks
|
||||
- ./playlist.txt:/var/lib/tmserver/playlist.txt # => Custom playlist
|
||||
- ./blacklist:/var/lib/xaseco/blacklist # => Plugin blacklist
|
||||
- ./blacklist.txt:/var/lib/xaseco/blacklist.txt # => Plugin blacklis1
|
||||
- ./plugins:/var/lib/xaseco/plugins/custom # => Custom plugins
|
||||
- ./config:/var/lib/xaseco/config # => Custom configuration files
|
||||
ports:
|
||||
|
|
|
@ -14,8 +14,13 @@ fi
|
|||
|
||||
PLUGINS_LIST=($(ls -d plugins/*.php | sed -e 's/plugins\///g'))
|
||||
|
||||
[[ -r ./blacklist ]] && \
|
||||
PLUGINS_LIST=($(echo ${PLUGINS_LIST[@]} | tr ' ' '\n' | grep -vFf blacklist))
|
||||
[[ -w ./blacklist.txt ]] && dos2unix ./blacklist || {
|
||||
echo "Can't convert blacklist to Unix line breaks. Check file permissions..."
|
||||
exit 1
|
||||
}
|
||||
|
||||
[[ -r ./blacklist.txt ]] && \
|
||||
PLUGINS_LIST=($(echo ${PLUGINS_LIST[@]} | tr ' ' '\n' | grep -vf blacklist))
|
||||
|
||||
{
|
||||
# open with header -- \n interpreted
|
||||
|
|
Loading…
Reference in New Issue