try privileged way

This commit is contained in:
benkuly 2020-06-02 22:04:52 +02:00
parent 2fd8216fbc
commit 26846a5f6c
3 changed files with 2 additions and 5 deletions

View File

@ -22,8 +22,6 @@ matrix_sms_bridge_default_room: ""
matrix_sms_bridge_gammu_reset_frequency: 3600 matrix_sms_bridge_gammu_reset_frequency: 3600
# (optional) group with unix read and write rights to modem # (optional) group with unix read and write rights to modem
matrix_sms_bridge_modem_group: 'dialout' matrix_sms_bridge_modem_group: 'dialout'
# (optional) cgroup major number to allow access to devices, that gets reconnected (e.g. due to reset)
matrix_sms_bridge_cgroup_major_number: '188'
``` ```

View File

@ -48,7 +48,6 @@ matrix_sms_bridge_homserver_domain: "{{ matrix_domain }}"
matrix_sms_bridge_default_room: '' matrix_sms_bridge_default_room: ''
matrix_sms_bridge_gammu_modem: '' matrix_sms_bridge_gammu_modem: ''
matrix_sms_bridge_cgroup_major_number: '188'
matrix_sms_bridge_modem_group: 'dialout' matrix_sms_bridge_modem_group: 'dialout'
matrix_sms_bridge_gammu_reset_frequency: 0 matrix_sms_bridge_gammu_reset_frequency: 0

View File

@ -29,8 +29,8 @@ ExecStart=/usr/bin/docker run --rm --name matrix-sms-bridge \
-v {{ matrix_sms_bridge_config_path }}:/config:z \ -v {{ matrix_sms_bridge_config_path }}:/config:z \
-v {{ matrix_sms_bridge_data_path }}:/data:z \ -v {{ matrix_sms_bridge_data_path }}:/data:z \
-v {{ matrix_sms_bridge_config_path }}/gammu-smsdrc:/etc/gammu-smsdrc:z \ -v {{ matrix_sms_bridge_config_path }}/gammu-smsdrc:/etc/gammu-smsdrc:z \
--device-cgroup-rule='c {{ matrix_sms_bridge_cgroup_major_number }}:* rmw' \ --privileged \
--device {{ matrix_sms_bridge_gammu_modem }}:{{ matrix_sms_bridge_gammu_modem }} \ -v /dev:/dev \
{% for arg in matrix_sms_bridge_container_extra_arguments %} {% for arg in matrix_sms_bridge_container_extra_arguments %}
{{ arg }} \ {{ arg }} \
{% endfor %} {% endfor %}