Skip to content

Commit

Permalink
Update PHP scripts to remove Apache2
Browse files Browse the repository at this point in the history
  • Loading branch information
hebertcisco committed Aug 5, 2024
1 parent e5da9a6 commit 59852c4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/basics/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Basics
```sh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hebertcisco/deb-install/master/packages/basics/basics.sh)"
```
```

## Remove apache2
```sh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hebertcisco/deb-install/master/packages/basics/remove-apache2.sh)"
```
9 changes: 9 additions & 0 deletions packages/basics/remove-apache2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

if [ -x "$(command -v apache2)" ]; then
sudo apt-get remove apache2 -y
sudo apt-get autoremove -y
echo "Apache2 removed."
else
return 1
fi
1 change: 1 addition & 0 deletions packages/php/php8.1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ if ! command -v php >/dev/null; then
echo 'installing php8.1'
sudo apt update && sudo apt -y upgrade
sudo apt autoremove
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hebertcisco/deb-install/master/packages/basics/remove-apache2.sh)"
sudo apt install -y lsb-release gnupg2 ca-certificates apt-transport-https software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
Expand Down
1 change: 1 addition & 0 deletions packages/php/php8.2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ if ! command -v php >/dev/null; then
echo 'installing php8.2'
sudo apt update && sudo apt -y upgrade
sudo apt autoremove
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hebertcisco/deb-install/master/packages/basics/remove-apache2.sh)"
sudo apt install -y lsb-release gnupg2 ca-certificates apt-transport-https software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
Expand Down
1 change: 1 addition & 0 deletions packages/php/php8.3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ if ! command -v php >/dev/null; then
echo 'installing php8.3'
sudo apt update && sudo apt -y upgrade
sudo apt autoremove
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hebertcisco/deb-install/master/packages/basics/remove-apache2.sh)"
sudo apt install -y lsb-release gnupg2 ca-certificates apt-transport-https software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
Expand Down

0 comments on commit 59852c4

Please # to comment.