summaryrefslogtreecommitdiffstats
path: root/modules-available/rebootcontrol/api.inc.php
blob: c230b4c542676b6c5dac2cd87ccc91da0acc1bef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php

if (Request::any('action') === 'rebuild' && isLocalExecution()) {
	if (Module::isAvailable('sysconfig')) {
		SSHKey::getPrivateKey($regen);
		if (!$regen) {
			// Was not regenerated, in which case getPrivateKey() would've already called rebuildAllConfigs()
			ConfigTgz::rebuildAllConfigs();
		}
		echo "OK";
	}
	exit(0);
}