소스 검색

Add reload-config and db-check-and-fix

Fmstrat 2 년 전
부모
커밋
b9c76789d9
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 11 0
      domain.sh

+ 11 - 0
domain.sh

@@ -29,6 +29,8 @@ Usage:
 	domain remove-user-from-group <user> <group>
 	domain update-ip <domain> <controller> <oldip> <newip>
 	domain flush-cache
+	domain reload-config
+	domain db-check-and-fix
 ';
 }
 
@@ -108,6 +110,15 @@ case "${1}" in
 	flush-cache)
 		net cache flush
 		;;
+	reload-config)
+		if [ -f /etc/samba/external/smb.conf ]; then
+			cp -f /etc/samba/external/smb.conf /etc/samba/smb.conf
+		fi
+		net cache flush
+		;;
+	db-check-and-fix)
+		samba-tool dbcheck --cross-ncs --fix --yes
+		;;
 	*)
 		usage;
 esac