- char *address = get_my_hostname();
- printf("%s/%s%s\n", address, hash, cookie);
+ char *url;
+ xasprintf(&url, "%s/%s%s", address, hash, cookie);
+
+ // Call the inviation-created script
+ setenv("NAME", myname, true);
+ setenv("NETNAME", netname, true);
+ setenv("NODE", argv[1], true);
+ setenv("INVITATION_FILE", filename, true);
+ setenv("INVITATION_URL", url, true);
+ char *scriptname;
+ xasprintf(&scriptname, "\"%s" SLASH "invitation-created\"", confbase);
+ system(scriptname);
+ free(scriptname);
+ unsetenv("NODE");
+ unsetenv("INVITATION");
+
+ puts(url);
+ free(url);