Closed cdent closed 11 years ago
This script should do the job: https://gist.github.com/pads/5548896
I've tested it locally and it produces new lines in the Nginx aliases file as follows:
server_name thisispads.me.uk;
If a www domain is specified:
server_name thisispads.me.uk www.thisispads.me.uk;
An example tiddler it produces:
{
"creator": null,
"fields": {
"mapped_space": "pads",
"_hash": "da39a3ee5e6b4b0d3255bfef95601890afd80709"
},
"created": "20130510090635",
"recipe": null,
"modified": "20130510090747",
"uri": "http://tiddlyspace.org:8080/bags/MAPSPACE/tiddlers/thisispads.me.uk",
"bag": "MAPSPACE",
"text": "",
"title": "thisispads.me.uk",
"permissions": [
"read",
"write",
"create",
"delete"
],
"modifier": null,
"type": null,
"tags": [
],
"revision": 188
}
Hopefully this is what is required?
I've updated the above to reflect these comments: https://gist.github.com/pads/5548896#comment-828548
May as well drop the script in ~tidlyweb/bin
and call it done?
This isn't something we particularly want in the distribution as it relies on a particular server setup.
When doing Bring Your Own Domain two operations are necessary on the server:
server_name
in nginx) for the new domainMAPSPACE
bag withmapped_space
with a value of the target spaceThis second step could easily be a simple
twanager
command or call totwanager tiddler
which gets integrated into a shell script that does the first step.