您最多选择25个主题
主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。
|
- #!/bin/bash
-
- {% for folder in shared_folders.keys() | list %}
- # {{folder}}
-
- mkdir -p "{{folder}}"
-
- {% if shared_folders[folder].owner is defined %}
- chown \
- {% if shared_folders[folder].recursive is defined and shared_folders[folder].recursive %}
- -R \
- {% endif %}
- "{{shared_folders[folder].owner}}" "{{folder}}"
- {% endif %}
- {% if shared_folders[folder].group is defined %}
- chgrp \
- {% if shared_folders[folder].recursive is defined and shared_folders[folder].recursive %}
- -R \
- {% endif %}
- "{{shared_folders[folder].group}}" "{{folder}}"
- {% endif %}
-
- {% if shared_folders[folder].acls is defined %}
- setfacl --remove-all \
- {% if shared_folders[folder].recursive is defined and shared_folders[folder].recursive %}
- --recursive \
- {% endif %}
- -m user::rwX \
- -m group::--- \
- -m other::--- \
- {% for acl in shared_folders[folder].acls %}
- -m {{acl}} \
- {% endfor %}
- "{{folder}}"
-
- setfacl --default \
- {% if shared_folders[folder].recursive is defined and shared_folders[folder].recursive %}
- --recursive \
- {% endif %}
- -m user::rwx \
- -m group::--- \
- -m other::--- \
- {% for acl in shared_folders[folder].acls %}
- -m {{acl}} \
- {% endfor %}
- "{{folder}}"
- {% endif %}
-
- {% endfor %}
|