File tree 1 file changed +13
-5
lines changed
ui/References/Linux/package_scripts
1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
echo " [*] After install (<%= version %> : <%= pkg %> : $1 )"
4
4
5
- DIR=/usr/share/applications
6
- DESKTOP_FILE=$DIR /IVPN.desktop
7
- if [ -d " $DIR " ]; then
5
+ # update permissions for .desktop file and icon
6
+ DESKTOP_SRC_FILE=/opt/ivpn/ui/IVPN.desktop
7
+ ICON_SRC_FILE=/opt/ivpn/ui/ivpnicon.svg
8
+ sudo chmod 744 $DESKTOP_SRC_FILE
9
+ sudo chmod 744 $ICON_SRC_FILE
10
+
11
+ # create link to .desktop file
12
+ APPS_DIR=/usr/share/applications
13
+ DESKTOP_APPS_FILE=$APPS_DIR /IVPN.desktop
14
+ if [ -d " $APPS_DIR " ]; then
8
15
echo " [ ] Installing .desktop file..."
9
- ln -fs /opt/ivpn/ui/IVPN.desktop $DESKTOP_FILE || echo " [!] Failed to create .desktop file: '$DESKTOP_FILE '"
16
+ ln -fs $DESKTOP_SRC_FILE $DESKTOP_APPS_FILE || echo " [!] Failed to create link to .desktop file: '$DESKTOP_SRC_FILE ' -> ' $DESKTOP_APPS_FILE '"
10
17
else
11
- echo " [!] Unable to install .desktop file. Folder '$DIR ' not exists"
18
+ echo " [!] Unable to install .desktop file. Folder '$APPS_DIR ' not exists"
12
19
fi
13
20
21
+ # electron app requires 'chrome-sandbox' to be setuid root in some systems
14
22
sudo chmod 4755 /opt/ivpn/ui/bin/chrome-sandbox || echo " [!] Failed to 'chmod' for '/opt/ivpn/ui/bin/chrome-sandbox'"
You can’t perform that action at this time.
0 commit comments