mirror of
https://github.com/linuxserver/docker-freshrss.git
synced 2026-02-20 02:14:47 +08:00
commit
d3626cef60
@ -1,16 +1,17 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
# make our folders
|
||||
mkdir -p \
|
||||
/config/{crontabs,www/freshrss}
|
||||
|
||||
# create symlinks
|
||||
symlinks=( \
|
||||
/app/www/data \
|
||||
/app/www/extensions )
|
||||
symlinks=(
|
||||
/app/www/data
|
||||
/app/www/extensions
|
||||
)
|
||||
|
||||
for i in "${symlinks[@]}"
|
||||
do
|
||||
for i in "${symlinks[@]}"; do
|
||||
if [[ -e "$i" && ! -L "$i" ]]; then
|
||||
mv "$i" "${i}.bak"
|
||||
fi
|
||||
@ -23,7 +24,7 @@ do
|
||||
done
|
||||
|
||||
# backwards compatibility
|
||||
if grep -q 'root /config/www/freshrss/p;' /config/nginx/site-confs/default.conf; then
|
||||
if grep -q 'root /config/www/freshrss/p;' /config/nginx/site-confs/default.conf; then
|
||||
cp /defaults/nginx/site-confs/default.conf.sample /config/nginx/site-confs/default.conf
|
||||
fi
|
||||
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
DEFAULT_CONF="/config/nginx/site-confs/default.conf"
|
||||
OLD_ROOT="root /usr/share/webapps/freshrss/p;"
|
||||
NEW_ROOT="root /app/www/p;"
|
||||
|
||||
if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}";then
|
||||
if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}"; then
|
||||
echo "updating root in ${DEFAULT_CONF}"
|
||||
sed -i "s|${OLD_ROOT}|${NEW_ROOT}|" "${DEFAULT_CONF}"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user