Skip to content

Commit

Permalink
fix(tailscale-watcher): force restart nginx
Browse files Browse the repository at this point in the history
Closes dkaser/unraid-tailscale#92

Signed-off-by: Derek Kaser <[email protected]>
  • Loading branch information
dkaser committed Oct 30, 2023
1 parent d572961 commit 49c50bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

if ($configure_extra_interfaces) {
logmsg("Restarting Unraid services");
exec($restart_command);
}
logmsg("Restarting Unraid services");
exec($restart_command);
exec("/etc/rc.d/rc.nginx term");
exec("/etc/rc.d/rc.nginx start");

3 changes: 2 additions & 1 deletion src/usr/local/emhttp/plugins/tailscale/tailscale-watcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "{$docroot}/plugins/tailscale/include/common.php";

$timer = 60;
$timer = 15;
$saved_addresses = array();

logmsg("Starting tailscale-watcher");
Expand All @@ -19,6 +19,7 @@
foreach ($interfaces["tailscale1"]["unicast"] as $interface) {
if (isset($interface["address"])) {
$new_addresses[] = $interface["address"];
$timer = 60;
}
}
}
Expand Down

0 comments on commit 49c50bb

Please sign in to comment.