Skip to content

Commit

Permalink
remove virtualhost domain name from hosts file
Browse files Browse the repository at this point in the history
  • Loading branch information
fatihgvn committed Feb 17, 2023
1 parent d078bec commit 21c10b8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions system/bin/remove-conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ then
rm -v /etc/apache2/sites-available/$1.conf
fi

if [ -f "/usr/local/apachep/system/hosts/ssl.$1.conf" ]
if [ -n "$(grep $1 /etc/hosts)" ]
then
rm -v /usr/local/apachep/system/hosts/ssl.$1.conf
rm -v /etc/apache2/sites-available/ssl.$1.conf
fi
echo "$1 Found in your hosts, Removing now...";
sed -i "/$1/d" /etc/hosts
else
echo "$1 was not found in your hosts";
fi

0 comments on commit 21c10b8

Please sign in to comment.