Compare commits
13 commits
ci-enablem
...
master
Author | SHA1 | Date | |
---|---|---|---|
Ludovic Poujol | 3400434f90 | ||
Ludovic Poujol | a7c1af3d83 | ||
Ludovic Poujol | 188e63376d | ||
Ludovic Poujol | a30ba3337b | ||
Ludovic Poujol | b014f1584a | ||
99741826f6 | |||
Mathieu Trossevin | 5a22490dc8 | ||
95108897b0 | |||
Mathieu Trossevin | fd0f03ab05 | ||
whirigoyen | 93c9e450ff | ||
Mathieu Trossevin | 2b6b76b78d | ||
Mathieu Trossevin | 21eef58a96 | ||
Mathieu Trossevin | 9419242465 |
17
CHANGELOG.md
17
CHANGELOG.md
|
@ -12,6 +12,20 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
### Security
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [24.04]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
* Prevent op_del to fail and able to remove web account when part of it is already removed
|
* Prevent op_del to fail and able to remove web account when part of it is already removed
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -20,6 +34,9 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
* letsencrypt: Add required check when retrieving certificate. (Avoid TypeError.)
|
||||||
|
* web-add.sh: Fix ssh group membership (#94)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
@ -157,6 +157,9 @@ class LetsEncrypt
|
||||||
{
|
{
|
||||||
$stream = stream_context_create(array("ssl" => array("capture_peer_cert" => true)));
|
$stream = stream_context_create(array("ssl" => array("capture_peer_cert" => true)));
|
||||||
$read = stream_socket_client("ssl://" . $domain . ":443", $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $stream);
|
$read = stream_socket_client("ssl://" . $domain . ":443", $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $stream);
|
||||||
|
if ($read === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$cont = stream_context_get_params($read);
|
$cont = stream_context_get_params($read);
|
||||||
|
|
||||||
return $cont;
|
return $cont;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION="23.02"
|
VERSION="24.04"
|
||||||
HOME="/root"
|
HOME="/root"
|
||||||
CONTACT_MAIL="jdoe@example.org"
|
CONTACT_MAIL="jdoe@example.org"
|
||||||
WWWBOUNCE_MAIL="jdoe@example.org"
|
WWWBOUNCE_MAIL="jdoe@example.org"
|
||||||
|
@ -363,14 +363,12 @@ create_www_account() {
|
||||||
lxc-attach -n php"${php_version}" -- /usr/sbin/adduser --disabled-password --home "$HOME_DIR_USER"/www --no-create-home --shell /bin/false --gecos "WWW $in_login" www-"$in_login" --uid "$www_uid" --ingroup "$in_login" --force-badname >/dev/null
|
lxc-attach -n php"${php_version}" -- /usr/sbin/adduser --disabled-password --home "$HOME_DIR_USER"/www --no-create-home --shell /bin/false --gecos "WWW $in_login" www-"$in_login" --uid "$www_uid" --ingroup "$in_login" --force-badname >/dev/null
|
||||||
done
|
done
|
||||||
|
|
||||||
if grep -qE '^AllowGroups' /etc/ssh/sshd_config; then
|
if grep -qE '^AllowUsers' /etc/ssh/sshd_config; then
|
||||||
if ! grep -qE "^AllowGroups(\\s+\\S+)*(\\s+$SSH_GROUP)" /etc/ssh/sshd_config; then
|
|
||||||
sed -i "s/^AllowGroups .*/& $SSH_GROUP/" /etc/ssh/sshd_config
|
|
||||||
groupadd --force $SSH_GROUP
|
|
||||||
fi
|
|
||||||
usermod -a -G $SSH_GROUP "$in_login"
|
|
||||||
elif grep -qE '^AllowUsers' /etc/ssh/sshd_config; then
|
|
||||||
sed -i "s/^AllowUsers .*/& $in_login/" /etc/ssh/sshd_config
|
sed -i "s/^AllowUsers .*/& $in_login/" /etc/ssh/sshd_config
|
||||||
|
else
|
||||||
|
if getent group "$SSH_GROUP" 1>/dev/null 2>&1; then
|
||||||
|
usermod --append --groups "$SSH_GROUP" "$in_login"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
/etc/init.d/ssh reload
|
/etc/init.d/ssh reload
|
||||||
|
|
||||||
|
@ -766,7 +764,7 @@ op_del() {
|
||||||
|
|
||||||
# Deactivate web vhost (apache or nginx)
|
# Deactivate web vhost (apache or nginx)
|
||||||
if [ "$WEB_SERVER" == "apache" ]; then
|
if [ "$WEB_SERVER" == "apache" ]; then
|
||||||
if a2query -s test12 >/dev/null 2&>1; then
|
if a2query -s "${login}" >/dev/null 2&>1; then
|
||||||
a2dissite "${login}.conf"
|
a2dissite "${login}.conf"
|
||||||
fi
|
fi
|
||||||
rm -f /etc/apache2/sites-available/"$login.conf"
|
rm -f /etc/apache2/sites-available/"$login.conf"
|
||||||
|
|
Loading…
Reference in a new issue