aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/wg-quick.bash
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/wg-quick.bash')
-rwxr-xr-xsrc/tools/wg-quick.bash1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/wg-quick.bash b/src/tools/wg-quick.bash
index da4c0d4..7dc8be1 100755
--- a/src/tools/wg-quick.bash
+++ b/src/tools/wg-quick.bash
@@ -197,6 +197,7 @@ save_config() {
current_config="$(cmd wg showconf "$INTERFACE")"
trap 'rm -f "$CONFIG_FILE.tmp"; exit' INT TERM EXIT
echo "${current_config/\[Interface\]$'\n'/$new_config}" > "$CONFIG_FILE.tmp" || die "Could not write configuration file"
+ sync "$CONFIG_FILE.tmp"
mv "$CONFIG_FILE.tmp" "$CONFIG_FILE" || die "Could not move configuration file"
trap - INT TERM EXIT
umask "$old_umask"