Added CT: Linkwarden
This commit is contained in:
32
CT-Files/linkwarden/Scripts/Init.sh
Normal file
32
CT-Files/linkwarden/Scripts/Init.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/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
|
||||
|
||||
#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
|
||||
Reference in New Issue
Block a user