Make an install script
This commit is contained in:
parent
7bcc5f414c
commit
d300d22f89
|
@ -132,9 +132,16 @@ cp /etc/ssl/certs/dovecot-ca.crt /home/$USERNAME/emailcert
|
|||
mv /etc/ssl/private/$USERNAME.key /home/$USERNAME/emailcert
|
||||
mv /etc/ssl/certs/$USERNAME.crt /home/$USERNAME/emailcert
|
||||
|
||||
# make an install script
|
||||
echo '#!/bin/bash' > /home/$USERNAME/emailcert/install.sh
|
||||
echo "sudo mv $USERNAME.crt /etc/ssl/certs" >> /home/$USERNAME/emailcert/install.sh
|
||||
echo "sudo mv $USERNAME.key /etc/ssl/private" >> /home/$USERNAME/emailcert/install.sh
|
||||
echo 'exit 0' >> /home/$USERNAME/emailcert/install.sh
|
||||
|
||||
# set permissions for the user
|
||||
chmod -R 755 /home/$USERNAME/emailcert
|
||||
chown -R $USERNAME:$USERNAME /home/$USERNAME/emailcert
|
||||
chmod +x /home/$USERNAME/emailcert/install.sh
|
||||
|
||||
shred -zu /etc/ssl/requests/$USERNAME.csr
|
||||
|
||||
|
|
Loading…
Reference in New Issue