forked from Underground-Ops/underground-nexus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
underground-nexus-update.sh
29 lines (26 loc) · 1.59 KB
/
underground-nexus-update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#Initiate dagger CI update and patch manager
cd /nexus-bucket/underground-nexus/
git pull https://github.com/Underground-Ops/underground-nexus.git
dagger project init
dagger project update
dagger do build
rm -r /usr/local/bin/underground-nexus-update.sh
cp /nexus-bucket/underground-nexus/underground-nexus-update.sh /usr/local/bin/
rm -r /nexus-bucket/underground-nexus-update.sh
cp /nexus-bucket/underground-nexus/underground-nexus-update.sh /nexus-bucket
#Update Control Panel - powered by Wordpress
docker stack rm underground-wordpress
rm -r /var/lib/docker/volumes/underground-wordpress_db_data/_data
mkdir /var/lib/docker/volumes/underground-wordpress_db_data/_data
cp /nexus-bucket/underground-nexus/'Production Artifacts'/Wordpress/_data.zip /var/lib/docker/volumes/underground-wordpress_db_data/_data/
cd /var/lib/docker/volumes/underground-wordpress_db_data/_data/
unzip _data.zip
rm -r /var/lib/docker/volumes/underground-wordpress_db_data/_data/_data.zip
docker stack deploy -c /nexus-bucket/underground-nexus/wordpress-proxy-deploy.yml underground-wordpress
cd /nexus-bucket/underground-nexus/
#Update Workbench
docker exec workbench apt update -y && docker exec workbench apt upgrade -y && docker exec workbench apt dist-upgrade -y && docker exec workbench apt autoclean -y && docker exec workbench apt clean -y && docker exec workbench apt autoremove
#Update local Kali Linux Athena0 node
docker exec Athena0 apt update -y && docker exec Athena0 apt upgrade -y && docker exec Athena0 apt dist-upgrade -y
docker exec Athena0 apt autoclean -y && docker exec Athena0 apt clean -y
docker exec Athena0 apt autoremove