Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
slapos.package
Commits
7640394f
Commit
7640394f
authored
Dec 29, 2021
by
Levin Zimmermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook: Fix sensor permission for reboot
parent
036244b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
playbook/roles/olimex-sensor/files/olimex-sensor-set-sensor-permission.sh
...limex-sensor/files/olimex-sensor-set-sensor-permission.sh
+3
-0
playbook/roles/olimex-sensor/tasks/main.yml
playbook/roles/olimex-sensor/tasks/main.yml
+15
-3
No files found.
playbook/roles/olimex-sensor/files/olimex-sensor-set-sensor-permission.sh
0 → 100644
View file @
7640394f
#!/bin/bash
chgrp
slapsoft /dev/i2c-3
playbook/roles/olimex-sensor/tasks/main.yml
View file @
7640394f
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
-
python-smbus
-
python-smbus
state
:
present
state
:
present
-
name
:
Install setuptools
-
name
:
Install setuptools
pip
:
pip
:
name
:
setuptools
name
:
setuptools
...
@@ -23,5 +22,18 @@
...
@@ -23,5 +22,18 @@
src
:
read_bme280.j2
src
:
read_bme280.j2
dest
:
/usr/local/bin/custom_read_bme280.py
dest
:
/usr/local/bin/custom_read_bme280.py
-
name
:
Add access sensor permission for slapsoft
-
name
:
Set sensor permission script path
shell
:
chgrp slapsoft /dev/i2c-3
set_fact
:
set_olimex_sensor_permission_path
:
/usr/bin/olimex-sensor-set-sensor-permission
-
name
:
Move script to grant access to sensor to file path
copy
:
src
:
olimex-sensor-set-sensor-permission.sh
dest
:
"
{{
set_olimex_sensor_permission_path
}}"
mode
:
755
-
name
:
Include olimex-sensor-set-sensor-permission at reboot on cron
cron
:
name="Set permission on reboot" special_time=reboot job="sleep 30 && {{ set_olimex_sensor_permission_path }}"
-
name
:
Run olimex-sensor-set-sensor-permission
shell
:
"
{{
set_olimex_sensor_permission_path
}}"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment