buildbot-workers/elcapitan.user
Peter Surda 4dc938f1fa
Some checks failed
buildbot/travis_bionic Build done.
Initial commit
2021-11-19 21:42:27 +08:00

19 lines
630 B
Plaintext

## template: jinja
#cloud-config
/usr/bin/dscl . -passwd /Users/johndoe "abcd"
fname=/var/lib/buildbot/workers/default/buildbot.tac
if [ -f "$fname" ]; then
sed -i '' -E "
s/^workername = '.*'/workername = '{{buildbot_username}}'/g;
s/^passwd = '.*'/passwd = '{{buildbot_password}}'/g;
s/^buildmaster_host = '.*'/buildmaster_host = '{{buildbot_master}}'/g;
" "$fname"
else
su - buildbot buildbot-worker create-worker /var/lib/buildbot/workers/default '{{buildbot_master}}' '{{buildbot_username}}' '{{buildbot_password}}'
fi
launchctl kickstart -k system/net.sourceforge.buildbot.worker