mirror of
https://github.com/tteck/Proxmox.git
synced 2024-11-17 20:11:17 +00:00
Update paperless-ngx-install.sh
make `/paperless.creds` easier to read
This commit is contained in:
parent
3b0168b8d4
commit
7306991688
@ -100,12 +100,10 @@ DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
|||||||
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
|
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
|
||||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
|
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
|
||||||
echo "Paperless-ngx Database User" >>~/paperless.creds
|
echo "" >>~/paperless.creds
|
||||||
echo $DB_USER >>~/paperless.creds
|
echo -e "Paperless-ngx Database User: \e[32m$DB_USER\e[0m" >>~/paperless.creds
|
||||||
echo "Paperless-ngx Database Password" >>~/paperless.creds
|
echo -e "Paperless-ngx Database Password: \e[32m$DB_PASS\e[0m" >>~/paperless.creds
|
||||||
echo $DB_PASS >>~/paperless.creds
|
echo -e "Paperless-ngx Database Name: \e[32m$DB_NAME\e[0m" >>~/paperless.creds
|
||||||
echo "Paperless-ngx Database Name" >>~/paperless.creds
|
|
||||||
echo $DB_NAME >>~/paperless.creds
|
|
||||||
mkdir -p {consume,media}
|
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_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_DBHOST=localhost|PAPERLESS_DBHOST=localhost|' /opt/paperless/paperless.conf
|
||||||
@ -126,18 +124,12 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
|||||||
systemctl reload apache2
|
systemctl reload apache2
|
||||||
IP=$(hostname -I | awk '{print $1}')
|
IP=$(hostname -I | awk '{print $1}')
|
||||||
echo "" >>~/paperless.creds
|
echo "" >>~/paperless.creds
|
||||||
echo "Adminer Interface" >>~/paperless.creds
|
echo -e "Adminer Interface: \e[32m$IP/adminer/\e[0m" >>~/paperless.creds
|
||||||
echo $IP/adminer/ >>~/paperless.creds
|
echo -e "Adminer System: \e[32mPostgreSQL\e[0m" >>~/paperless.creds
|
||||||
echo "Adminer System" >>~/paperless.creds
|
echo -e "Adminer Server: \e[32mlocalhost:5432\e[0m" >>~/paperless.creds
|
||||||
echo PostgreSQL >>~/paperless.creds
|
echo -e "Adminer Username: \e[32m$DB_USER\e[0m" >>~/paperless.creds
|
||||||
echo "Adminer Server" >>~/paperless.creds
|
echo -e "Adminer Password: \e[32m$DB_PASS\e[0m" >>~/paperless.creds
|
||||||
echo localhost:5432 >>~/paperless.creds
|
echo -e "Adminer Database: \e[32m$DB_NAME\e[0m" >>~/paperless.creds
|
||||||
echo "Adminer Username" >>~/paperless.creds
|
|
||||||
echo $DB_USER >>~/paperless.creds
|
|
||||||
echo "Adminer Password" >>~/paperless.creds
|
|
||||||
echo $DB_PASS >>~/paperless.creds
|
|
||||||
echo "Adminer Database" >>~/paperless.creds
|
|
||||||
echo $DB_NAME >>~/paperless.creds
|
|
||||||
msg_ok "Installed Adminer"
|
msg_ok "Installed Adminer"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -152,10 +144,9 @@ user.is_staff = True
|
|||||||
user.save()
|
user.save()
|
||||||
EOF
|
EOF
|
||||||
echo "" >>~/paperless.creds
|
echo "" >>~/paperless.creds
|
||||||
echo "Paperless-ngx WebUI User" >>~/paperless.creds
|
echo -e "Paperless-ngx WebUI User: \e[32madmin\e[0m" >>~/paperless.creds
|
||||||
echo admin >>~/paperless.creds
|
echo -e "Paperless-ngx WebUI Password: \e[32m$DB_PASS\e[0m" >>~/paperless.creds
|
||||||
echo "Paperless-ngx WebUI Password" >>~/paperless.creds
|
echo "" >>~/paperless.creds
|
||||||
echo $DB_PASS >>~/paperless.creds
|
|
||||||
msg_ok "Set up admin Paperless-ngx User & Password"
|
msg_ok "Set up admin Paperless-ngx User & Password"
|
||||||
|
|
||||||
msg_info "Creating Services"
|
msg_info "Creating Services"
|
||||||
|
Loading…
Reference in New Issue
Block a user