mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-25 01:54:44 +00:00
Changedetection: move env vars from service file to .env (#13732)
This commit is contained in:
@@ -56,6 +56,10 @@ NODE_VERSION="24" setup_nodejs
|
|||||||
msg_info "Installing Change Detection"
|
msg_info "Installing Change Detection"
|
||||||
mkdir /opt/changedetection
|
mkdir /opt/changedetection
|
||||||
$STD pip3 install changedetection.io
|
$STD pip3 install changedetection.io
|
||||||
|
cat <<EOF >/opt/changedetection/.env
|
||||||
|
WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub
|
||||||
|
PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch=eyJkZWZhdWx0Vmlld3BvcnQiOnsiaGVpZ2h0Ijo3MjAsIndpZHRoIjoxMjgwfSwiaGVhZGxlc3MiOmZhbHNlLCJzdGVhbHRoIjp0cnVlfQ==&blockAds=true
|
||||||
|
EOF
|
||||||
msg_ok "Installed Change Detection"
|
msg_ok "Installed Change Detection"
|
||||||
|
|
||||||
msg_info "Installing Browserless & Playwright"
|
msg_info "Installing Browserless & Playwright"
|
||||||
@@ -112,12 +116,13 @@ Description=Change Detection
|
|||||||
After=network-online.target
|
After=network-online.target
|
||||||
After=network.target browserless.service
|
After=network.target browserless.service
|
||||||
Wants=browserless.service
|
Wants=browserless.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
EnvironmentFile=/opt/changedetection/.env
|
||||||
WorkingDirectory=/opt/changedetection
|
WorkingDirectory=/opt/changedetection
|
||||||
Environment=WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub
|
|
||||||
Environment=PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch=eyJkZWZhdWx0Vmlld3BvcnQiOnsiaGVpZ2h0Ijo3MjAsIndpZHRoIjoxMjgwfSwiaGVhZGxlc3MiOmZhbHNlLCJzdGVhbHRoIjp0cnVlfQ==&blockAds=true
|
|
||||||
ExecStart=changedetection.io -d /opt/changedetection -p 5000
|
ExecStart=changedetection.io -d /opt/changedetection -p 5000
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
@@ -126,15 +131,16 @@ cat <<EOF >/etc/systemd/system/browserless.service
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=browserless service
|
Description=browserless service
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Environment=CONNECTION_TIMEOUT=60000
|
Environment=CONNECTION_TIMEOUT=60000
|
||||||
WorkingDirectory=/opt/browserless
|
WorkingDirectory=/opt/browserless
|
||||||
ExecStart=/opt/browserless/scripts/start.sh
|
ExecStart=/opt/browserless/scripts/start.sh
|
||||||
SyslogIdentifier=browserless
|
SyslogIdentifier=browserless
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
systemctl enable -q --now browserless
|
systemctl enable -q --now browserless
|
||||||
systemctl enable -q --now changedetection
|
systemctl enable -q --now changedetection
|
||||||
msg_ok "Created Services"
|
msg_ok "Created Services"
|
||||||
|
|||||||
Reference in New Issue
Block a user