diff options
Diffstat (limited to 'snap/hooks/install')
-rwxr-xr-x | snap/hooks/install | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/snap/hooks/install b/snap/hooks/install index e51cdb5..fa05c6c 100755 --- a/snap/hooks/install +++ b/snap/hooks/install @@ -1,9 +1,9 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python # DO NOT MODIFY MANUALLY # This helper installs the polkit policy file # for the RiseupVPN snap. # It is generated automatically -# by the script at "pkg/riseupvpn/pack_installers" +# by the script at "snap/pre/pack_installers" import subprocess from base64 import decodestring as decode @@ -14,9 +14,10 @@ with open('/usr/share/polkit-1/actions/se.leap.bitmask.riseupvpn.policy', 'w') a for line in lines: polkit.write(line.decode() + "\n") -release = subprocess.run(['cat', '/etc/os-release'], stdout=subprocess.PIPE).stdout +with open('/etc/os-release') as f: + release = f.read() # this is a workaround for the fact that debian does not place snap desktop entries in a system+wide path. -if b'ID=debian' in release: +if 'ID=debian' in release: cmd = 'ln -s /snap/riseup-vpn/current/snap/gui/riseup-vpn.desktop /usr/share/applications/' subprocess.run(cmd.split(' ')) subprocess.run(['update-desktop-database']) |