forked from EngineScript/EngineScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenginescript-cleanup.sh
More file actions
38 lines (31 loc) · 1.24 KB
/
enginescript-cleanup.sh
File metadata and controls
38 lines (31 loc) · 1.24 KB
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
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
#----------------------------------------------------------------------------
# EngineScript - A High-Performance WordPress Server Built on Ubuntu and Cloudflare
#----------------------------------------------------------------------------
# Website: https://EngineScript.com
# GitHub: https://github.com/Enginescript/EngineScript
# Company: VisiStruct / EngineScript
# License: GPL v3.0
# OS: Ubuntu 22.04 (jammy)
#----------------------------------------------------------------------------
# EngineScript Variables
source /usr/local/bin/enginescript/enginescript-variables.txt
source /home/EngineScript/enginescript-install-options.txt
# Check current user's ID. If user is not 0 (root), exit.
if [ "${EUID}" != 0 ];
then
echo "${BOLD}ALERT:${NORMAL}"
echo "EngineScript should be executed as the root user."
exit
fi
#----------------------------------------------------------------------------
# Start Main Script
# Cleanup
# Remove Apache and old PHP installations
apt-get remove 'apache2.*' 'php7\.0.*' 'php7\.1.*' 'php7\.2.*' 'php7\.3.*' 'php7\.4.*' 'php8\.0.*' -y
# Remove old downloads
rm -rf /usr/src/*.tar.gz*
# Remove old packages
apt clean -y
apt autoremove --purge -y
apt autoclean -y