From 9dab6d52bcf62cd71a5488b547b2b88be3115a7d Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 11 Sep 2023 16:56:42 -0400 Subject: [PATCH] Update paperless-ngx-install.sh create directories named "consume," "data," "media," and "static," then configure the corresponding paths in the `paperless.conf` file. --- install/paperless-ngx-install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 49a9bff2..b52064bf 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -87,6 +87,12 @@ sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://gi $STD pip install --upgrade pip $STD pip install -r requirements.txt curl -s -o /opt/paperless/paperless.conf https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/paperless.conf.example +mkdir -p {consume,data,media,static} +sed -i -e 's|#PAPERLESS_REDIS=redis://localhost:6379|PAPERLESS_REDIS=redis://localhost:6379|' /opt/paperless/paperless.conf +sed -i -e "s|#PAPERLESS_CONSUMPTION_DIR=../consume|PAPERLESS_CONSUMPTION_DIR=/opt/paperless/consume|" /opt/paperless/paperless.conf +sed -i -e "s|#PAPERLESS_DATA_DIR=../data|PAPERLESS_DATA_DIR=/opt/paperless/data|" /opt/paperless/paperless.conf +sed -i -e "s|#PAPERLESS_MEDIA_ROOT=../media|PAPERLESS_MEDIA_ROOT=/opt/paperless/media|" /opt/paperless/paperless.conf +sed -i -e "s|#PAPERLESS_STATICDIR=../static|PAPERLESS_STATICDIR=/opt/paperless/static|" /opt/paperless/paperless.conf msg_ok "Installed Paperless-ngx" msg_info "Installing Natural Language Toolkit (Patience)" @@ -104,8 +110,6 @@ echo "" >>~/paperless.creds echo -e "Paperless-ngx Database User: \e[32m$DB_USER\e[0m" >>~/paperless.creds echo -e "Paperless-ngx Database Password: \e[32m$DB_PASS\e[0m" >>~/paperless.creds echo -e "Paperless-ngx Database Name: \e[32m$DB_NAME\e[0m" >>~/paperless.creds -mkdir -p {consume,media} -sed -i -e 's|#PAPERLESS_REDIS=redis://localhost:6379|PAPERLESS_REDIS=redis://localhost:6379|' /opt/paperless/paperless.conf sed -i -e 's|#PAPERLESS_DBHOST=localhost|PAPERLESS_DBHOST=localhost|' /opt/paperless/paperless.conf sed -i -e 's|#PAPERLESS_DBPORT=5432|PAPERLESS_DBPORT=5432|' /opt/paperless/paperless.conf sed -i -e "s|#PAPERLESS_DBNAME=paperless|PAPERLESS_DBNAME=$DB_NAME|" /opt/paperless/paperless.conf @@ -214,6 +218,7 @@ motd_ssh customize msg_info "Cleaning up" +rm -rf /opt/paperless/docker $STD apt-get autoremove $STD apt-get autoclean msg_ok "Cleaned"