mirror of https://github.com/tteck/Proxmox.git
remove user inputs
This commit is contained in:
parent
d4fa5ee357
commit
5d3b287e53
|
@ -30,58 +30,13 @@ mkdir -p /opt/scrutiny/web
|
||||||
mkdir -p /opt/scrutiny/bin
|
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/scrutiny_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/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"
|
||||||
|
|
||||||
DEFAULT_HOST="127.0.0.1"
|
|
||||||
DEFAULT_PORT="8086"
|
|
||||||
DEFAULT_TOKEN="my-token"
|
|
||||||
DEFAULT_ORG="my-org"
|
|
||||||
DEFAULT_BUCKET="bucket"
|
|
||||||
read -r -p "Enter InfluxDB Host/IP [$DEFAULT_HOST]: " HOST
|
|
||||||
HOST=${HOST:-$DEFAULT_HOST}
|
|
||||||
read -r -p "Enter InfluxDB Port [$DEFAULT_PORT]: " PORT
|
|
||||||
PORT=${PORT:-$DEFAULT_PORT}
|
|
||||||
read -r -p "Enter InfluxDB Token [$DEFAULT_TOKEN]: " TOKEN
|
|
||||||
TOKEN=${TOKEN:-$DEFAULT_TOKEN}
|
|
||||||
read -r -p "Enter InfluxDB Organization [$DEFAULT_ORG]: " ORG
|
|
||||||
ORG=${ORG:-$DEFAULT_ORG}
|
|
||||||
read -r -p "Enter InfluxDB Bucket [$DEFAULT_BUCKET]: " BUCKET
|
|
||||||
BUCKET=${BUCKET:-$DEFAULT_BUCKET}
|
|
||||||
|
|
||||||
msg_info "Setup InfluxDB-Connection"
|
|
||||||
cat << EOF >/opt/scrutiny/config/scrutiny.yaml
|
|
||||||
version: 1
|
|
||||||
web:
|
|
||||||
listen:
|
|
||||||
port: 8080
|
|
||||||
host: 0.0.0.0
|
|
||||||
|
|
||||||
database:
|
|
||||||
location: /opt/scrutiny/config/scrutiny.db
|
|
||||||
src:
|
|
||||||
frontend:
|
|
||||||
path: /opt/scrutiny/web
|
|
||||||
|
|
||||||
influxdb:
|
|
||||||
host: $HOST
|
|
||||||
port: $PORT
|
|
||||||
token: '$TOKEN'
|
|
||||||
org: '$ORG'
|
|
||||||
bucket: '$BUCKET'
|
|
||||||
retention_policy: true
|
|
||||||
# tls:
|
|
||||||
# insecure_skip_verify: false
|
|
||||||
|
|
||||||
log:
|
|
||||||
file: '' #absolute or relative paths allowed, eg. web.log
|
|
||||||
level: INFO
|
|
||||||
EOF
|
|
||||||
msg_ok "Setup InfluxDB-Connection"
|
|
||||||
|
|
||||||
msg_info "Setup Service"
|
msg_info "Setup Service"
|
||||||
cat <<EOF >/etc/systemd/system/scrutiny.service
|
cat <<EOF >/etc/systemd/system/scrutiny.service
|
||||||
[Unit]
|
[Unit]
|
||||||
|
|
Loading…
Reference in New Issue