Fixed visudo?
parent
6957137552
commit
99e47b6355
|
@ -37,7 +37,9 @@ ipstring="${3}"
|
||||||
printf 'Signing SSL certs for %s.%s.%s...\n' "${hostname}" "${username}" "${TLD}" >>"${LOGFILE}"
|
printf 'Signing SSL certs for %s.%s.%s...\n' "${hostname}" "${username}" "${TLD}" >>"${LOGFILE}"
|
||||||
|
|
||||||
# Make a directory for the new files
|
# Make a directory for the new files
|
||||||
which mkdir >>"${LOGFILE}"
|
which rm >>"${LOGFILE}"
|
||||||
|
which sudo >>"${LOGFILE}"
|
||||||
|
which chmod >>"${LOGFILE}"
|
||||||
if ! sudo mkdir "${SSL_CONFIG_DIR:?}/${username:?}/${hostname:?}/" >>"${LOGFILE}" 2>/dev/null; then
|
if ! sudo mkdir "${SSL_CONFIG_DIR:?}/${username:?}/${hostname:?}/" >>"${LOGFILE}" 2>/dev/null; then
|
||||||
printf 'Failed to create directory %s/%s/%s/\n' "${SSL_CONFIG_DIR}" "${username}" "${hostname}" >>"${LOGFILE}"
|
printf 'Failed to create directory %s/%s/%s/\n' "${SSL_CONFIG_DIR}" "${username}" "${hostname}" >>"${LOGFILE}"
|
||||||
exit 7
|
exit 7
|
||||||
|
|
|
@ -21,7 +21,7 @@ RUN sed -i "s|DocumentRoot .*$|DocumentRoot /var/www/cgi-bin\n\tScriptAlias / /v
|
||||||
/etc/apache2/sites-available/000-default.conf
|
/etc/apache2/sites-available/000-default.conf
|
||||||
|
|
||||||
# Allow http to run these binaries as root with sudo
|
# Allow http to run these binaries as root with sudo
|
||||||
RUN echo "www-data ALL=(ALL:ALL) NOPASSWD: /usr/bin/wg, /usr/bin/openssl, /usr/bin/mkdir, /usr/bin/rm, /usr/bin/chmod" \
|
RUN echo "www-data ALL=(ALL:ALL) NOPASSWD: /usr/bin/wg, /usr/bin/openssl, /bin/mkdir, /usr/bin/rm, /usr/bin/chmod" \
|
||||||
| sudo EDITOR='tee -a' visudo
|
| sudo EDITOR='tee -a' visudo
|
||||||
|
|
||||||
# Prepare filesystem
|
# Prepare filesystem
|
||||||
|
|
Loading…
Reference in New Issue