The expected behavior of --batch --force is that all parameters in the
invitation are accepted, whether unsafe or not. Unsafe variables were
already accepted with --force in commit
061362d2f, this commit ensures
the generated tinc-up script is enabled as well.
Fixes #196 on GitHub.
}
}
} else {
- fprintf(stderr, "A tinc-up script was generated, but has been left disabled.\n");
+ if(force) {
+ rename(filename, filename2);
+ chmod(filename2, 0755);
+ fprintf(stderr, "tinc-up enabled.\n");
+ } else {
+ fprintf(stderr, "A tinc-up script was generated, but has been left disabled.\n");
+ }
}
} else {
// A placeholder was generated.