forked from awsassets/linux-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker_entry_deb.sh
More file actions
executable file
·30 lines (24 loc) · 830 Bytes
/
docker_entry_deb.sh
File metadata and controls
executable file
·30 lines (24 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# Start network manager and dbus system
sudo /etc/init.d/dbus start && \
sudo /etc/init.d/network-manager start
# Start gnome-keyring daemon at bash shell init and launch interactive dbus session
echo 'eval "$(printf '\\n' | gnome-keyring-daemon --unlock)"' >> ~/.bashrc
export $(dbus-launch)
## 1. Create the keyring manually with a dummy password in stdin
eval "$(printf '\n' | gnome-keyring-daemon --unlock)"
if [ -f .env ]; then
echo 'find local .env ~ load new env';
export $(cat .env | xargs);
env;
fi
# Add polkit rules so that user can make any actions
sudo bash -c "cat <<EOT > /etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla
[nm-applet]
Identity=unix-user:user
Action=org.freedesktop.NetworkManager.*
ResultAny=yes
ResultInactive=no
ResultActive=yes
EOT"
exec "$@";