Results 1 to 1 of 1
I am making a scriptthat will detect if the samba share in inaccessible for any reason (for me, this happens a lot; hence the need for this script ) and ...
- 02-20-2008 #1
Samba network script - help!!
I am making a scriptthat will detect if the samba share in inaccessible for any reason (for me, this happens a lot; hence the need for this script
) and then it will (if it is inaccessible) ask you to enter your password to restart it.
The script goes something like this:
It occurred to me that it may not be able to check, or even read directories on a network for security reasons, so can anyone recommend another way for checking it?Code:#!/bin/bash while [ 1 == 1 ]; do if [ -d "smb://ubuntu/win" ]; then sleep 500 else zenity --notification --text "Please enter the root password to restart the malfunctioning Samba networking system" gksudo /etc/init.d/samba restart zenity --notification --window-icon="/usr/share/icons/Human/24x24/actions/dialog-apply.png" --text "Samba network restarted successfully!" & fi done
When I find myself burried in errors, Windows Help appears to me; speaking words of wisdom, Reboot!


Reply With Quote