Compare commits

..

2 Commits

Author SHA1 Message Date
tteckster 1e62c159f1
Update nocodb.sh
- default Debian 12
- new update path
2023-10-21 09:54:09 -04:00
tteckster f3c8d3c774
Update nocodb-install.sh
- full code overhaul
2023-10-21 09:52:23 -04:00
2 changed files with 11 additions and 21 deletions

View File

@ -23,7 +23,7 @@ var_disk="4"
var_cpu="1" var_cpu="1"
var_ram="1024" var_ram="1024"
var_os="debian" var_os="debian"
var_version="11" var_version="12"
variables variables
color color
catch_errors catch_errors
@ -54,10 +54,12 @@ function update_script() {
header_info header_info
if [[ ! -f /etc/systemd/system/nocodb.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi if [[ ! -f /etc/systemd/system/nocodb.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating ${APP}" msg_info "Updating ${APP}"
systemctl stop nocodb.service
cd /opt/nocodb cd /opt/nocodb
npm uninstall -s --save nocodb &>/dev/null rm nocodb
npm install -s --save nocodb &>/dev/null curl -s http://get.nocodb.com/linux-x64 -o nocodb -L
systemctl restart nocodb.service chmod +x nocodb
systemctl start nocodb.service
msg_ok "Updated Successfully" msg_ok "Updated Successfully"
exit exit
} }

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