+#ifndef HAVE_MINGW
+ char *filename;
+ xasprintf(&filename, "%s" SLASH "tinc-up", confbase);
+ if(access(filename, F_OK)) {
+ FILE *f = fopen(filename, "w");
+ if(!f) {
+ fprintf(stderr, "Could not create file %s: %s\n", filename, strerror(errno));
+ return 1;
+ }
+ fchmod(fileno(f), 0755);
+ fprintf(f, "#!/bin/sh\n\necho 'Unconfigured tinc-up script, please edit!'\n\n#ifconfig $INTERFACE <your vpn IP address> netmask <netmask of whole VPN>\n");
+ fclose(f);
+ }
+#endif
+
+ return 0;