Skip to content

Commit 933be15

Browse files
authored
[docker-entrypoint.sh] Add custom formats (RSS-Bridge#3179)
1 parent b4f9d27 commit 933be15

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docker-entrypoint.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
#!/usr/bin/env bash
22

3-
# - Find custom files (bridges, whitelist, config.ini) in the /config folder
3+
# - Find custom files (bridges, formats, whitelist, config.ini) in the /config folder
44
# - Copy them to the respective folders in /app
5-
# This will overwrite previous configs and bridges of same name
5+
# This will overwrite previous configs, bridges and formats of same name
66
# If there are no matching files, rss-bridge works like default.
77

88
find /config/ -type f -name '*' -print0 2> /dev/null |
99
while IFS= read -r -d '' file; do
1010
file_name="$(basename "$file")" # Strip leading path
1111
if [[ $file_name = *" "* ]]; then
12-
printf 'Custom Bridge %s has a space in the name and will be skipped.\n' "$file_name"
12+
printf 'Custom file %s has a space in the name and will be skipped.\n' "$file_name"
1313
continue
1414
fi
1515
case "$file_name" in
1616
*Bridge.php) yes | cp "$file" /app/bridges/ ;
1717
chown www-data:www-data "/app/bridges/$file_name";
1818
printf "Custom Bridge %s added.\n" $file_name;;
19+
*Format.php) yes | cp "$file" /app/formats/ ;
20+
chown www-data:www-data "/app/formats/$file_name";
21+
printf "Custom Format %s added.\n" $file_name;;
1922
config.ini.php) yes | cp "$file" /app/ ;
2023
chown www-data:www-data "/app/$file_name";
2124
printf "Custom config.ini.php added.\n";;

0 commit comments

Comments
 (0)