34 lines
1.3 KiB
Bash
34 lines
1.3 KiB
Bash
#!/bin/sh
|
|
|
|
#Install monolith
|
|
CurmonolithVersion=$(curl -s https://api.github.com/repos/Y2Z/monolith/releases/latest | grep 'tag_name.*' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " " |tr -d : )
|
|
curl -L -o /opt/monolith-gnu-linux-x86_64 https://github.com/Y2Z/monolith/releases/download/"$CurmonolithVersion"/monolith-gnu-linux-x86_64
|
|
chmod +x /opt/monolith-gnu-linux-x86_64
|
|
echo "$CurmonolithVersion" > /opt/monolith-Version
|
|
ln -s /opt/monolith-gnu-linux-x86_64 /usr/local/bin/monolith
|
|
mv /opt/Setup/Scripts/Update-monolith.sh /opt/Update-monolith.sh
|
|
|
|
#Install linkwarden
|
|
|
|
rm -rf /root/.cache
|
|
startpath=$(pwd)
|
|
|
|
#Install Linkwarden
|
|
echo $(curl -s https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep 'tag_name.*' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " " |tr -d : ) > /opt/linkwarden-Version
|
|
npm install -g yarn
|
|
git clone https://github.com/linkwarden/linkwarden.git /opt/node/linkwarden
|
|
cd /opt/node/linkwarden
|
|
npx playwright install --with-deps chromium
|
|
rm -rf /root/.cache
|
|
|
|
yarn install
|
|
yarn prisma generate
|
|
yarn build
|
|
yarn cache clean
|
|
apt clean
|
|
|
|
cd $startpath
|
|
cp /opt/node/linkwarden/.env.sample /opt/node/linkwarden/.env
|
|
chown node: -R /opt/node/linkwarden
|
|
su -c "cd /opt/node/linkwarden; npx playwright install chromium" node
|
|
mv /opt/Setup/Scripts/Update-linkwarden.sh /opt/Update-linkwarden.sh |