コード例 #1
0
#! /usr/bin/php
<?php 
//  execute this script in a daily crontab to enable auto-renew of your VHFFS let's encrypt certificates
require_once __DIR__ . '/includes/autoload.inc.php';
require_once __DIR__ . '/vendor/autoload.php';
// query DB, loop domains to renew
$servernames = VHFFS_letsencrypt::get_servernames_to_renew();
foreach ($servernames as $servername) {
    ask_for_cert('renew', $servername);
    //TODO invoke a renew method instead of create
}
//TODO if vhffs_httpd cannot be found, revoke certificate and remove config from nginx
コード例 #2
0
ファイル: index.php プロジェクト: olaulau/VHFFS_letsencrypt
	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src="external/jquery.min.js"></script>
	<!-- Include all compiled plugins (below), or include individual files as needed -->
	<script src="external/bootstrap/js/bootstrap.min.js"></script>
	
	<script src="index.js"></script>
</head>
<body>

<?php 
//  print_r($_POST);
if (!empty($_POST)) {
    // 	var_dump($_POST); die;
    if (!empty($_POST['domain'])) {
        //TODO verify posted domain
        ask_for_cert('create', $_POST['domain']);
        $_SESSION['messages'][] = 'content added to queue. it will be treated as soon as possible.';
    } else {
        $_SESSION['messages'][] = 'Please select a domain from the list.';
    }
}
?>

	<div id="messages"class="container" role="main">
		<div style="position: absolute;">
<?php 
if (!empty($_SESSION['messages'])) {
    foreach ($_SESSION['messages'] as $message) {
        ?>
		<div class="alert alert-success" role="alert">
			<?php