mirror of https://github.com/tteck/Proxmox.git
Compare commits
8 Commits
e842d2ec3d
...
37f42468ba
Author | SHA1 | Date |
---|---|---|
|
37f42468ba | |
|
0812983a64 | |
|
2e268c2f49 | |
|
3dd1da2cf1 | |
|
44fc9b43cc | |
|
faf133ffed | |
|
22c03c89d3 | |
|
9bbe81fe42 |
|
@ -75,10 +75,9 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}
|
|||
rm -rf /opt/dashy
|
||||
mkdir -p /opt/dashy
|
||||
wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/${RELEASE}.tar.gz | tar -xz -C /opt/dashy --strip-components=1
|
||||
sed -i 's/NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build/NODE_OPTIONS=yarn vue-cli-service build/' /opt/dashy/package.json
|
||||
cd /opt/dashy
|
||||
yarn &>/dev/null
|
||||
yarn build &>/dev/null
|
||||
npm install &>/dev/null
|
||||
npm run build &>/dev/null
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP} to ${RELEASE}"
|
||||
|
||||
|
|
|
@ -17,30 +17,27 @@ msg_info "Installing Dependencies"
|
|||
$STD apt-get install -y curl
|
||||
$STD apt-get install -y sudo
|
||||
$STD apt-get install -y mc
|
||||
$STD apt-get install -y gpg
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing Node.js (Patience)"
|
||||
$STD apt-get install -y npm
|
||||
$STD npm cache clean -f
|
||||
$STD npm install -g n
|
||||
$STD n 16.20.1
|
||||
$STD npm install -g pnpm
|
||||
ln -sf /usr/local/bin/node /usr/bin/node
|
||||
msg_ok "Installed Node.js"
|
||||
msg_info "Setting up Node.js Repository"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||
msg_ok "Set up Node.js Repository"
|
||||
|
||||
msg_info "Installing Yarn"
|
||||
$STD npm install -g yarn
|
||||
ln -sf /usr/local/bin/yarn /usr/bin/yarn
|
||||
msg_ok "Installed Yarn"
|
||||
msg_info "Installing Node.js"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y nodejs
|
||||
msg_ok "Installed Node.js"
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/Lissy93/dashy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
msg_info "Installing Dashy ${RELEASE} (Patience)"
|
||||
mkdir -p /opt/dashy
|
||||
wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/${RELEASE}.tar.gz | tar -xz -C /opt/dashy --strip-components=1
|
||||
cd /opt/dashy
|
||||
sed -i 's/NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build/NODE_OPTIONS=yarn vue-cli-service build/' /opt/dashy/package.json
|
||||
$STD yarn
|
||||
$STD yarn build
|
||||
$STD npm install
|
||||
$STD npm run build
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed Dashy ${RELEASE}"
|
||||
|
||||
|
@ -52,7 +49,7 @@ Description=dashy
|
|||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/dashy
|
||||
ExecStart=/usr/bin/yarn start
|
||||
ExecStart=/usr/bin/npm start
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
|
Loading…
Reference in New Issue