first commit with existing files
This commit is contained in:
16
ncupdate_deprecated/files/00-default.conf
Normal file
16
ncupdate_deprecated/files/00-default.conf
Normal file
@@ -0,0 +1,16 @@
|
||||
<VirtualHost *:443>
|
||||
ServerAdmin webmaster@localhost
|
||||
|
||||
DocumentRoot /var/www/html
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
|
||||
SSLEngine on
|
||||
|
||||
SSLCertificateFile /etc/apache2/certs/apache.crt
|
||||
|
||||
SSLCertificateKeyFile /etc/apache2/certs/apache.key
|
||||
|
||||
</VirtualHost>
|
||||
4
ncupdate_deprecated/files/apache2.conf
Normal file
4
ncupdate_deprecated/files/apache2.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
<Directory /var/www/html>
|
||||
AllowOverride ALL
|
||||
</Directory>
|
||||
18
ncupdate_deprecated/files/https.sh
Normal file
18
ncupdate_deprecated/files/https.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
cat profile.sh >> $HOME/.bashrc
|
||||
apt update
|
||||
apt install smbclient apache2 openssl nano vim -y
|
||||
a2enmod ssl
|
||||
a2enmod rewrite
|
||||
cat /ncupdate/apache2.conf >> /etc/apache2/apache2.conf
|
||||
mkdir /etc/apache2/certs
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Write the nextcloud's URL to the COMMON NAME!"
|
||||
echo "Leave the other fields blank"
|
||||
echo ""
|
||||
echo -n "Press ENTER to countinue..."
|
||||
read x
|
||||
openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out /etc/apache2/certs/apache.crt -keyout /etc/apache2/certs/apache.key
|
||||
cat /ncupdate/00-default.conf >> /etc/apache2/sites-enabled/000-default.conf
|
||||
2
ncupdate_deprecated/files/profile.sh
Normal file
2
ncupdate_deprecated/files/profile.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
alias ls='ls --color="auto" --group-directory-first'
|
||||
alias ll='ls -alh'
|
||||
24
ncupdate_deprecated/update.sh
Normal file
24
ncupdate_deprecated/update.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
echo "Containers: "
|
||||
|
||||
sudo docker ps --format '{{.Names}}'
|
||||
|
||||
echo ""
|
||||
|
||||
echo -n "Container name: "
|
||||
|
||||
read cont
|
||||
|
||||
sudo docker exec -ti $cont mkdir /ncupdate/
|
||||
|
||||
sudo docker cp "./files/https.sh" $cont:/ncupdate/
|
||||
sudo docker cp "./files/00-default.conf" $cont:/ncupdate/
|
||||
sudo docker cp "./files/apache2.conf" $cont:/ncupdate/
|
||||
sudo docker cp "./files/profile.sh" $cont:/ncupdate/
|
||||
|
||||
sudo docker exec -ti $cont /bin/bash /ncupdate/https.sh
|
||||
|
||||
sudo docker restart $cont
|
||||
Reference in New Issue
Block a user