Update scrutiny-install.sh

This commit is contained in:
CanbiZ 2024-06-25 17:56:21 +02:00 committed by GitHub
parent 29ccfc9d20
commit 546b65d59e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 7 deletions

View File

@ -25,15 +25,14 @@ $STD apt-get install -y \
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Installing Scrutiny WebApp" msg_info "Installing Scrutiny WebApp"
mkdir -p /opt/scrutiny/config mkdir -p /opt/scrutiny/{config,web,bin}
mkdir -p /opt/scrutiny/web
mkdir -p /opt/scrutiny/bin
RELEASE=$(curl -s https://api.github.com/repos/analogj/scrutiny/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') RELEASE=$(curl -s https://api.github.com/repos/analogj/scrutiny/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
echo "${RELEASE}" >/opt/scrutiny_version.txt echo "${RELEASE}" >/opt/${APP}_version.txt
wget -q -O /opt/scrutiny/config/scrutiny.yaml https://raw.githubusercontent.com/AnalogJ/scrutiny/master/example.scrutiny.yaml wget -q -O /opt/scrutiny/config/scrutiny.yaml https://raw.githubusercontent.com/AnalogJ/scrutiny/master/example.scrutiny.yaml
wget -q -O /opt/scrutiny/bin/scrutiny-web-linux-amd64 "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-web-linux-amd64" wget -q -O /opt/scrutiny/bin/scrutiny-web-linux-amd64 "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-web-linux-amd64"
wget -q -O /opt/scrutiny/web/scrutiny-web-frontend.tar.gz "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-web-frontend.tar.gz" wget -q -O /opt/scrutiny/web/scrutiny-web-frontend.tar.gz "https://github.com/AnalogJ/scrutiny/releases/download/${RELEASE}/scrutiny-web-frontend.tar.gz"
cd /opt/scrutiny/web && tar xzf scrutiny-web-frontend.tar.gz --strip-components 1 -C . cd /opt/scrutiny/web
tar xzf scrutiny-web-frontend.tar.gz --strip-components 1 -C .
chmod +x /opt/scrutiny/bin/scrutiny-web-linux-amd64 chmod +x /opt/scrutiny/bin/scrutiny-web-linux-amd64
msg_ok "Installed Scrutiny WebApp" msg_ok "Installed Scrutiny WebApp"
@ -52,10 +51,9 @@ User=root
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
systemctl enable -q --now scrutiny.service systemctl enable -q --now scrutiny.service
msg_ok "Created and enabled Service" msg_ok "Created and enabled Service"
motd_ssh motd_ssh
customize customize