Added cat to visudo
parent
1e92c60d9b
commit
f6035c2dd6
|
@ -59,9 +59,9 @@ if ! sudo chmod 400 "${SSL_CONFIG_DIR}/${username}/${hostname}/server.key" >>"${
|
|||
fi
|
||||
|
||||
# Generate config
|
||||
which cat >>"${LOGFILE}"
|
||||
san="\n[SAN]\nsubjectAltNames=DNS:${hostname}.${username}.${TLD},DNS:*.${hostname}.${username}.${TLD}"
|
||||
[ "${ipstring}" != "" ] && san="${san},${ipstring}"
|
||||
printf "${san}" >>"${LOGFILE}"
|
||||
if ! printf '%s' "${san}" | sudo cat '/etc/ssl/openssl.cnf' /dev/stdin \
|
||||
| sudo tee "${SSL_CONFIG_DIR:?}/${username:?}/${hostname:?}.cnf"; then
|
||||
printf 'Failed to generate %s/%s.cnf\n' "${username}" "${hostname}" >>"${LOGFILE}"
|
||||
|
|
|
@ -21,7 +21,7 @@ RUN sed -i "s|DocumentRoot .*$|DocumentRoot /var/www/cgi-bin\n\tScriptAlias / /v
|
|||
/etc/apache2/sites-available/000-default.conf
|
||||
|
||||
# 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/[, /usr/bin/tee, /bin/mkdir, /bin/rm, /bin/chmod" \
|
||||
RUN echo "www-data ALL=(ALL:ALL) NOPASSWD: /usr/bin/wg, /usr/bin/openssl, /usr/bin/[, /usr/bin/tee, /bin/cat, /bin/mkdir, /bin/rm, /bin/chmod" \
|
||||
| sudo EDITOR='tee -a' visudo
|
||||
|
||||
# Create temporary files
|
||||
|
|
Loading…
Reference in New Issue