Move VPN provisioning onto router model
This commit is contained in:
@@ -79,4 +79,18 @@ public class WireGuardVpsService {
|
||||
|
||||
return result.stdout();
|
||||
}
|
||||
|
||||
public String restoreLastWireGuardBackup() {
|
||||
SshCommandResult result = sshService.executeOnConfiguredVps(
|
||||
"sudo /usr/local/sbin/lr-wg-restore-last-backup"
|
||||
);
|
||||
|
||||
if (result.exitCode() != 0) {
|
||||
throw new SshCommandException(
|
||||
"Failed to restore WireGuard backup: " + result.stderr()
|
||||
);
|
||||
}
|
||||
|
||||
return result.stdout();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user