Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Repozitorijs ir arhivēts. Tam var aplūkot failus un to var klonēt, bet nevar iesūtīt jaunas izmaiņas, kā arī atvērt jaunas problēmas/izmaiņu pieprasījumus.
|
- #!/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 %}
|