add dbus and allow to find key for pass
Build and Push Docker Container / build-and-push (push) Successful in 5m11s
Build and Push Docker Container / build-and-push (push) Successful in 5m11s
This commit is contained in:
+11
-3
@@ -1,14 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
# Start DBus session for libsecret
|
||||
eval $(dbus-launch --sh-syntax)
|
||||
|
||||
# Initialize
|
||||
if [[ $1 == init ]]; then
|
||||
|
||||
# Initialize pass
|
||||
gpg --generate-key --batch /protonmail/gpgparams
|
||||
pass init pass-key
|
||||
|
||||
# Change Permission when Folder Exists
|
||||
if [ -d "/root/.gnupg" ]; then
|
||||
chmod 700 /root/.gnupg
|
||||
fi
|
||||
|
||||
KEY=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/ {print $5; exit}')
|
||||
pass init "$KEY"
|
||||
|
||||
# Kill the other instance as only one can be running at a time.
|
||||
# This allows users to run entrypoint init inside a running conainter
|
||||
# which is useful in a k8s environment.
|
||||
|
||||
Reference in New Issue
Block a user