Signing back into the Community for the first time? You'll need to reset your password to access your account. Find out more.
Forum Discussion
XIII
3 years agoTrusted Contributor
How to make sure 1Password Connect is up and running before invoking op commands?
My main reason for using 1Password Connect is to replace .env
files with credentials in plain text.
These are mostly used by Node.js scripts that I start as services using systemd
on a Raspberry Pi.
I was planning to use systemd
's Wants
/Requires
and Before/After
syntax to make sure these scripts/services will only run once 1Password Connect is up and running.
Unfortunately, I noticed (using journalctl -f -u 1password-connect
after executing systemctl restart 1password-connect
) that it takes quite some time after invoking (ExecStart=
) docker-compose up
(in the 1password-connect
service) before I can (successfully) use the op
command.
How to make sure 1Password Connect is up and running before invoking op
commands?
(in scripts started as systemd
services?)
- XIIITrusted Contributor
This might help:
- XIIITrusted Contributor
Does not seem to support (waiting for)
${OP_CONNECT_HOST}
, because it does not allow the schemehttps://
in front...This Python script seems to work though: https://github.com/clarketm/wait-for-it
wait-for-it --server ${OP_CONNECT_HOST} --timeout 0
- Former Member
I am glad you got this to work and thanks for sharing your findings!