File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 2
2
set -ex
3
3
4
4
# 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"
6
7
7
- # Update desktop file to use executable path
8
+ # Update desktop file to use our launcher
8
9
DESKTOP_FILE=" /usr/share/applications/redisinsight.desktop"
9
10
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 "
12
13
fi
13
14
14
15
# 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
16
17
#!/bin/bash
17
18
18
- echo "Launching RedisInsight with args: $@"
19
- exec "/opt/Redis Insight/ redisinsight" "$@"
19
+ echo "Launching RedisInsight with args: \ $ @"
20
+ exec "$OLD_INSTALL_PATH / redisinsight" "\ $ @"
20
21
EOF
21
22
22
23
# Make the launcher script executable
23
- sudo chmod +x /usr/bin/redisinsight
24
+ sudo chmod +x " $LAUNCHER_PATH "
24
25
25
26
# Set basic executable permissions (on the original location)
26
27
if [ -f " $OLD_INSTALL_PATH /redisinsight" ]; then
You can’t perform that action at this time.
0 commit comments