19 lines
630 B
Plaintext
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
|