This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
final class Encryption { | |
private $key; | |
public function __construct($key) { | |
$this->key = hash('sha256', $key, true); | |
} | |
public function encrypt($value) { | |
return strtr(base64_encode(openssl_encrypt($value, 'aes-128-cbc', $this->key)), '+/=', '-_,'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
timestamp=$(date +"%Y-%m-%d %H:%M:%S") | |
/usr/local/psa/bin/certificate -c "${RENEWED_DOMAINS%% *} $timestamp" -domain ${RENEWED_DOMAINS%% *} -key-file $RENEWED_LINEAGE/privkey.pem -cert-file $RENEWED_L$ | |
if [[ $? != 0 ]] ; then | |
echo "The certificate creation for ${RENEWED_DOMAINS%% *} has failed on Plesk" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $# -eq 0 ]] ; then | |
echo "You need to specify the domain name" | |
exit 1 | |
fi | |
host $1 2>&1 > /dev/null | |
if [[ $? != 0 ]] ; then |