Fix key-chain

This commit is contained in:
Roxedus 2023-05-18 23:27:22 +02:00
parent c899ac69a4
commit cb72e7c94c
No known key found for this signature in database
GPG Key ID: EBC13557C4D91D7B
10 changed files with 19 additions and 18 deletions

View File

@ -19,13 +19,13 @@ RUN \
echo "**** install runtime dependencies ****" && \ echo "**** install runtime dependencies ****" && \
apt-get update && \ apt-get update && \
apt-get install -y \ apt-get install -y \
dbus-x11 \
git \ git \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
sudo && \ sudo && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
dbus-x11 \
gnome-keyring \ gnome-keyring \
libatomic1 \ libatomic1 \
libsecret-1-dev && \ libsecret-1-dev && \

View File

@ -0,0 +1,16 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
mkdir -p /config/.local/share/keyrings
if [ -f /etc/machine-id ]; then
dbus-uuidgen --ensure
sleep 1
fi
echo "keyring"
eval $(s6-setuidgid abc dbus-launch --sh-syntax)
echo 'somecredstorepass' | eval $(s6-setuidgid abc gnome-keyring-daemon --daemonize --components=pkcs11,secrets,ssh --unlock)
echo -n "${DBUS_SESSION_BUS_ADDRESS}" >/run/s6/container_environment/DBUS_SESSION_BUS_ADDRESS
#echo -n "${GNOME_KEYRING_CONTROL}" >/run/s6/container_environment/GNOME_KEYRING_CONTROL
#echo -n "${SSH_AUTH_SOCK}" >/run/s6/container_environment/SSH_AUTH_SOCK

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-keyring/run

View File

@ -30,17 +30,6 @@ for f in code_tunnel.json last-used-servers.json license_consent.json token.json
fi fi
done done
if [ -f /etc/machine-id ]; then
dbus-uuidgen --ensure
sleep 1
fi
if [ -z "${DBUS_SESSION_BUS_PID}" ]; then
eval $(s6-setuidgid abc dbus-launch)
echo -n "${DBUS_SESSION_BUS_ADDRESS}" >/run/s6/container_environment/DBUS_SESSION_BUS_ADDRESS
echo -n "${DBUS_SESSION_BUS_PID}" >/run/s6/container_environment/DBUS_SESSION_BUS_PID
fi
[[ ! -f /config/.bashrc ]] && \ [[ ! -f /config/.bashrc ]] && \
cp /root/.bashrc /config/.bashrc cp /root/.bashrc /config/.bashrc

View File

@ -1,5 +0,0 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
exec \
dbus-daemon --system --nofork

View File

@ -1 +0,0 @@
longrun