mirror of
https://github.com/edu4rdshl/linuxscripts.git
synced 2026-07-17 23:24:52 +00:00
Use defined variable instead of full path
This commit is contained in:
parent
6102260b2a
commit
6c1f3308ef
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ if command -v wget > /dev/null; then
|
|||
# Check internet connection and if not OK then restart all networking services
|
||||
echo "Testing your connection..."
|
||||
wget -q --tries=1 --timeout=1 https://google.com -O $ofile &> /dev/null
|
||||
if [ ! -s /tmp/google.txt ]; then
|
||||
if [ ! -s $ofile ]; then
|
||||
echo "Your connection is not working, restarting your network services: $services"
|
||||
sudo systemctl restart $services
|
||||
if [ $? -eq 0 ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue