Added logging to service file (#3738)

This commit is contained in:
Slaviša Arežina 2025-04-08 09:35:17 +02:00 committed by GitHub
parent a5acfd25f6
commit 125f843b19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,13 +15,13 @@ update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y \ $STD apt-get install -y \
gcc \ gcc \
gnupg \ gnupg \
ca-certificates \ ca-certificates \
musl-dev \ musl-dev \
mupdf \ mupdf \
libc6-dev \ libc6-dev \
musl-tools musl-tools
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Setting up Node.js Repository" msg_info "Setting up Node.js Repository"
@ -66,16 +66,16 @@ msg_ok "Setup Paperless-GPT"
mkdir -p /opt/paperless-gpt-data mkdir -p /opt/paperless-gpt-data
read -p "Do you want to enter the Paperless local URL now? (y/n) " input_url read -p "Do you want to enter the Paperless local URL now? (y/n) " input_url
if [[ "$input_url" =~ ^[Yy]$ ]]; then if [[ "$input_url" =~ ^[Yy]$ ]]; then
read -p "Enter your Paperless-NGX instance URL (e.g., http://192.168.1.100:8000): " PAPERLESS_BASE_URL read -p "Enter your Paperless-NGX instance URL (e.g., http://192.168.1.100:8000): " PAPERLESS_BASE_URL
else else
PAPERLESS_BASE_URL="http://your_paperless_ngx_url" PAPERLESS_BASE_URL="http://your_paperless_ngx_url"
fi fi
read -p "Do you want to enter the Paperless API token now? (y/n) " input_token read -p "Do you want to enter the Paperless API token now? (y/n) " input_token
if [[ "$input_token" =~ ^[Yy]$ ]]; then if [[ "$input_token" =~ ^[Yy]$ ]]; then
read -p "Enter your Paperless API token: " PAPERLESS_API_TOKEN read -p "Enter your Paperless API token: " PAPERLESS_API_TOKEN
else else
PAPERLESS_API_TOKEN="your_paperless_api_token" PAPERLESS_API_TOKEN="your_paperless_api_token"
fi fi
msg_info "Setup Environment" msg_info "Setup Environment"
@ -116,6 +116,8 @@ ExecStart=/opt/paperless-gpt/paperless-gpt
Restart=always Restart=always
User=root User=root
EnvironmentFile=/opt/paperless-gpt-data/.env EnvironmentFile=/opt/paperless-gpt-data/.env
StandardOutput=append:/var/log/paperless-gpt.log
StandardError=append:/var/log/paperless-gpt.log
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
@ -130,4 +132,4 @@ msg_info "Cleaning up"
rm -f $temp_file rm -f $temp_file
$STD apt-get -y autoremove $STD apt-get -y autoremove
$STD apt-get -y autoclean $STD apt-get -y autoclean
msg_ok "Cleaned" msg_ok "Cleaned"