Skip to content

Commit c76ac23

Browse files
committed
Fix and update tool installers
1 parent d92b78b commit c76ac23

File tree

5 files changed

+69
-3
lines changed

5 files changed

+69
-3
lines changed

resources/tools/gui-tools.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ LD_LIBRARY_PATH="" LD_PRELOAD="" apt-get install -y --no-install-recommends \
2424
ark \
2525
neovim \
2626
muon
27+
# Fix tmp permissions. Needed?
28+
chmod 1777 /tmp

resources/tools/nteract.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ fi
2727
if [ $INSTALL_ONLY = 0 ] ; then
2828
echo "Starting nteract..."
2929
echo "nteract is a GUI application. Make sure to run this script only within the VNC Desktop."
30-
nteract
30+
nteract --no-sandbox
3131
sleep 10
3232
fi

resources/tools/omnidb.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/sh
2+
3+
# Stops script execution if a command has an error
4+
set -e
5+
6+
INSTALL_ONLY=0
7+
# Loop through arguments and process them: https://pretzelhands.com/posts/command-line-flags
8+
for arg in "$@"; do
9+
case $arg in
10+
-i|--install) INSTALL_ONLY=1 ; shift ;;
11+
*) break ;;
12+
esac
13+
done
14+
15+
if ! hash omnidb-server 2>/dev/null; then
16+
echo "Installing OmniDB"
17+
cd $RESOURCES_PATH
18+
wget https://github.com/OmniDB/OmniDB/releases/download/3.0.2b/omnidb-server_3.0.2b_linux_x86_64.deb -O ./omnidb-server.deb
19+
apt-get update
20+
apt-get install -y ./omnidb-server.deb
21+
rm ./omnidb-server.deb
22+
fi
23+
24+
# Run
25+
if [ $INSTALL_ONLY = 0 ] ; then
26+
if [ -z "$PORT" ]; then
27+
read -p "Please provide a port for starting OmniDB: " PORT
28+
fi
29+
30+
echo "Starting OmniDB on port "$PORT
31+
# TODO: the normal tooling proxy does not work here since the traffic is not redirected the the configured base path
32+
# https://omnidb.readthedocs.io/en/latest/en/05_deploying_omnidb-server.html
33+
# use --path /tools/8000 to configure a base path
34+
omnidb-server --port=$PORT
35+
fi

resources/tools/pgadmin.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/sh
2+
3+
# Stops script execution if a command has an error
4+
set -e
5+
6+
INSTALL_ONLY=0
7+
# Loop through arguments and process them: https://pretzelhands.com/posts/command-line-flags
8+
for arg in "$@"; do
9+
case $arg in
10+
-i|--install) INSTALL_ONLY=1 ; shift ;;
11+
*) break ;;
12+
esac
13+
done
14+
15+
if ! hash pgadmin4 2>/dev/null; then
16+
echo "Installing pgAdmin4"
17+
pipx install pgadmin4
18+
fi
19+
20+
# Run
21+
if [ $INSTALL_ONLY = 0 ] ; then
22+
if [ -z "$PORT" ]; then
23+
read -p "Please provide a port for starting pgAdmin4: " PORT
24+
fi
25+
26+
echo "Starting pgAdmin4 on port "$PORT
27+
# TODO: Currently does not use port, can only be used from within VNC
28+
pgadmin4
29+
fi

resources/tools/sqlectron.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ for arg in "$@"; do
1313
done
1414

1515
if ! hash sqlectron 2>/dev/null; then
16-
cd /resources
16+
cd $RESOURCES_PATH
1717
echo "Installing Sqlectron Term. Please wait..."
1818
npm install -g sqlectron-term
1919
echo "Installing Sqlectron GUI"
@@ -27,6 +27,6 @@ fi
2727
if [ $INSTALL_ONLY = 0 ] ; then
2828
echo "Starting Sqlectron..."
2929
echo "Sqlectron is a GUI application. Make sure to run this script only within the VNC Desktop."
30-
sqlectron
30+
sqlectron --no-sandbox
3131
sleep 10
3232
fi

0 commit comments

Comments
 (0)