Skip to content
Snippets Groups Projects
Commit aa4c5c75 authored by Bob Mottram's avatar Bob Mottram
Browse files

chown

parent ab707c85
No related branches found
No related tags found
No related merge requests found
......@@ -58,11 +58,19 @@ function logging_off_searx {
function searx_set_default_background {
if [ -f "$rootdir/root/${PROJECT_NAME}/img/backgrounds/searx.jpg" ]; then
cp "$rootdir/root/${PROJECT_NAME}/img/backgrounds/searx.jpg" "$rootdir/etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg"
chown -R searx:searx "$rootdir${SEARX_PATH}/searx"
if [ "$rootdir" ]; then
chroot "$rootdir" chown -R searx:searx "${SEARX_PATH}/searx"
else
chown -R searx:searx "$rootdir${SEARX_PATH}/searx"
fi
else
if [ -f "$rootdir/home/$MY_USERNAME/${PROJECT_NAME}/img/backgrounds/searx.jpg" ]; then
cp "$rootdir/home/$MY_USERNAME/${PROJECT_NAME}/img/backgrounds/searx.jpg" "$rootdir/etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg"
chown -R searx:searx "$rootdir${SEARX_PATH}/searx"
if [ "$rootdir" ]; then
chroot "$rootdir" chown -R searx:searx "${SEARX_PATH}/searx"
else
chown -R searx:searx "$rootdir${SEARX_PATH}/searx"
fi
fi
fi
......
......@@ -34,11 +34,19 @@ SEARX_PORT=8888
function searx_set_default_background {
if [ -f "$rootdir/root/${PROJECT_NAME}/img/backgrounds/searx.jpg" ]; then
cp "$rootdir/root/${PROJECT_NAME}/img/backgrounds/searx.jpg" "$rootdir/etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg"
chown -R searx:searx "$rootdir${SEARX_PATH}/searx"
if [ "$rootdir" ]; then
chroot "$rootdir" chown -R searx:searx "${SEARX_PATH}/searx"
else
chown -R searx:searx "$rootdir${SEARX_PATH}/searx"
fi
else
if [ -f "$rootdir/home/$MY_USERNAME/${PROJECT_NAME}/img/backgrounds/searx.jpg" ]; then
cp "$rootdir/home/$MY_USERNAME/${PROJECT_NAME}/img/backgrounds/searx.jpg" "$rootdir/etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg"
chown -R searx:searx "$rootdir${SEARX_PATH}/searx"
if [ "$rootdir" ]; then
chroot "$rootdir" chown -R searx:searx "${SEARX_PATH}/searx"
else
chown -R searx:searx "$rootdir${SEARX_PATH}/searx"
fi
fi
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment