joininbox/ci/amd64/debian/scripts/sudoers.sh
openoms 890f702c04
add amd64 image build (#104)
* add amd64 image build
* add bootstrap.service to always prepare ssh
* add Makefile
* pass GITHUB_ACTOR GITHUB_HEAD_REF to the build
* download the build script from PR branch
* output amd64 images to ci/amd64/builds
2022-12-06 23:14:06 +00:00

9 lines
420 B
Bash

#!/bin/sh -eux
# Only add the secure path line if it is not already present
grep -q 'secure_path' /etc/sudoers \
|| sed -i -e '/Defaults\s\+env_reset/a Defaults\tsecure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' /etc/sudoers;
# Set up password-less sudo for the joinmarket user
echo 'joinmarket ALL=(ALL) NOPASSWD:ALL' >/etc/sudoers.d/99_joinmarket;
chmod 440 /etc/sudoers.d/99_joinmarket;