1
0
mirror of https://github.com/tteck/Proxmox.git synced 2024-12-25 10:42:53 +02:00

Update nocodb-install.sh

- full code overhaul
This commit is contained in:
tteckster 2023-10-21 09:52:23 -04:00 committed by GitHub
parent abd627f93b
commit f3c8d3c774
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,25 +17,13 @@ msg_info "Installing Dependencies"
$STD apt-get install -y curl $STD apt-get install -y curl
$STD apt-get install -y sudo $STD apt-get install -y sudo
$STD apt-get install -y mc $STD apt-get install -y mc
$STD apt-get install -y git
$STD apt-get install -y make
$STD apt-get install -y g++
$STD apt-get install -y gcc
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Installing Node.js"
$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh)
. ~/.bashrc
$STD nvm install 16.20.1
ln -sf /root/.nvm/versions/node/v16.20.1/bin/node /usr/bin/node
ln -sf /root/.nvm/versions/node/v16.20.1/bin/npm /usr/bin/npm
msg_ok "Installed Node.js"
msg_info "Installing NocoDB" msg_info "Installing NocoDB"
$STD git clone https://github.com/nocodb/nocodb-seed mkdir -p /opt/nocodb
mv nocodb-seed /opt/nocodb
cd /opt/nocodb cd /opt/nocodb
$STD npm install curl -s http://get.nocodb.com/linux-x64 -o nocodb -L
chmod +x nocodb
msg_ok "Installed NocoDB" msg_ok "Installed NocoDB"
msg_info "Creating Service" msg_info "Creating Service"
@ -48,11 +36,11 @@ Type=simple
Restart=always Restart=always
User=root User=root
WorkingDirectory=/opt/nocodb WorkingDirectory=/opt/nocodb
ExecStart=/usr/bin/npm start ExecStart=/opt/nocodb/./nocodb
[Install] [Install]
WantedBy=multi-user.target" >$service_path WantedBy=multi-user.target" >$service_path
systemctl enable --now nocodb.service &>/dev/null systemctl enable -q --now nocodb.service &>/dev/null
msg_ok "Created Service" msg_ok "Created Service"
motd_ssh motd_ssh