File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,12 @@ echo "setting hostname to:" $HOSTNAME.REALM
5959hostnamectl set-hostname $HOSTNAME .$REALM
6060currentTimestamp=` date +%y-%m-%d-%H:%M:%S`
6161echo " Backing up existing samba conf to:" /etc/samba/smb.conf.$currentTimestamp .bak
62- mv /etc/samba/smb.conf /etc/samba/smb.conf.$currentTimestamp .bak
62+ if [ -f /etc/samba/smb.conf ]; then
63+ mv /etc/samba/smb.conf /etc/samba/smb.conf.$currentTimestamp .bak
64+ echo " Moved /etc/samba/smb.conf to /etc/samba/smb.conf.$currentTimestamp .bak"
65+ else
66+ echo " File /etc/samba/smb.conf does not exist. Skipping."
67+ fi
6368echo " Generating kerberos ticket, please enter password at the prompt....."
6469kinit $USERNAME @$REALM
6570echo " Validating we can discover the domain....."
You can’t perform that action at this time.
0 commit comments