mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 23:32:06 -04:00
Fixes #7667. Implements the plan described in #7667. Here's a terminal log showing that it does so: ``` # sudo snap connect certbot:plugin certbot-dns-dnsimple error: cannot perform the following tasks: - Run hook prepare-plug-plugin of snap "certbot" (run hook "prepare-plug-plugin": ----- Only connect this interface if you trust the plugin author to have root on the system Run `snap set certbot trust-plugin-with-root=ok` to acknowledge this and then run this command again to perform the connection -----) # snap set certbot trust-plugin-with-root=ok # sudo snap connect certbot:plugin certbot-dns-dnsimple # sudo snap disconnect certbot:plugin certbot-dns-dnsimple:certbot # sudo snap connect certbot:plugin certbot-dns-dnsimple error: cannot perform the following tasks: - Run hook prepare-plug-plugin of snap "certbot" (run hook "prepare-plug-plugin": ----- Only connect this interface if you trust the plugin author to have root on the system Run `snap set certbot trust-plugin-with-root=ok` to acknowledge this and then run this command again to perform the connection -----) ``` * Add plugin connection hook to accept root trust * snapctl requires a configure hook to set options * Add sh notice * Update changelog
11 lines
486 B
Bash
11 lines
486 B
Bash
#!/bin/bash -e
|
|
|
|
if [ "$(snapctl get trust-plugin-with-root)" = "ok" ]; then
|
|
# allow the connection, but reset config to allow for other slots to go through this auth flow
|
|
snapctl unset trust-plugin-with-root
|
|
exit 0
|
|
else
|
|
echo "Only connect this interface if you trust the plugin author to have root on the system"
|
|
echo "Run \`snap set $SNAP_NAME trust-plugin-with-root=ok\` to acknowledge this and then run this command again to perform the connection"
|
|
exit 1
|
|
fi
|