Skip to content

Commit 2a8e924

Browse files
author
KIvanow
committed
RI-6690 alternative spot for the launcher
1 parent c0cb041 commit 2a8e924

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

scripts/deb-after-install.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,26 @@
22
set -ex
33

44
# Define paths
5-
OLD_INSTALL_PATH="/opt/Redis Insight" # Path with space
5+
OLD_INSTALL_PATH="/opt/Redis Insight"
6+
LAUNCHER_PATH="/opt/redisinsight-launcher"
67

7-
# Update desktop file to use executable path
8+
# Update desktop file to use our launcher
89
DESKTOP_FILE="/usr/share/applications/redisinsight.desktop"
910
if [ -f "$DESKTOP_FILE" ]; then
10-
echo "Updating desktop file to use executable path"
11-
sudo sed -i "s|Exec=.*|Exec=/usr/bin/redisinsight|g" "$DESKTOP_FILE"
11+
echo "Updating desktop file to use launcher"
12+
sudo sed -i "s|Exec=.*|Exec=$LAUNCHER_PATH|g" "$DESKTOP_FILE"
1213
fi
1314

1415
# Create simple launcher script that directly uses full path
15-
sudo tee /usr/bin/redisinsight > /dev/null << 'EOF'
16+
sudo tee "$LAUNCHER_PATH" > /dev/null << EOF
1617
#!/bin/bash
1718
18-
echo "Launching RedisInsight with args: $@"
19-
exec "/opt/Redis Insight/redisinsight" "$@"
19+
echo "Launching RedisInsight with args: \$@"
20+
exec "$OLD_INSTALL_PATH/redisinsight" "\$@"
2021
EOF
2122

2223
# Make the launcher script executable
23-
sudo chmod +x /usr/bin/redisinsight
24+
sudo chmod +x "$LAUNCHER_PATH"
2425

2526
# Set basic executable permissions (on the original location)
2627
if [ -f "$OLD_INSTALL_PATH/redisinsight" ]; then

0 commit comments

Comments
 (0)