-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall
More file actions
executable file
·48 lines (37 loc) · 1.27 KB
/
uninstall
File metadata and controls
executable file
·48 lines (37 loc) · 1.27 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
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
# Kill all processes running /opt/vscode/node
echo "## Killing all processes running /opt/vscode/node"
pkill -f "/opt/vscode/node"
uninstall_xdebug() {
local version=$1
local version_underscore=${version//./_}
echo "## Stop and disable the PHP ${version} Xdebug"
systemctl stop php${version}xdbg-fpm
systemctl disable php${version}xdbg-fpm
echo "## Remove service files"
rm -rf /etc/init.d/php${version}xdbg-fpm
rm -rf /lib/systemd/system/php${version}xdbg-fpm.service
echo "## Uninstall Xdebug for PHP $version"
apt-get -qq remove php${version}-xdebug
echo "## Remove Xdebug profile for PHP $version"
rm -rf /etc/php/${version}xdbg
echo "## Remove template file"
rm -rf /usr/local/hestia/data/templates/web/php-fpm/PHP-${version_underscore}xdbg.tpl
}
uninstall_xdebug 7.4
uninstall_xdebug 8.0
uninstall_xdebug 8.1
uninstall_xdebug 8.2
uninstall_xdebug 8.3
# Clean up all vscode- user domains
rm -rf /etc/nginx/conf.d/domains/vscode-*
rm -rf /opt/vscode
if [ -d "/etc/php.pre-xdebug" ]; then
rm -rf /etc/php.pre-xdebug
fi;
# Restart the services
echo "## Reload systemd manager configuration"
systemctl daemon-reload
echo "## Restarting the Nginx service"
systemctl restart nginx