Fix fix asusctl

This commit is contained in:
Przemek Grondek 2023-04-24 04:04:17 +02:00
parent 93631cd468
commit be124761d4
3 changed files with 12 additions and 13 deletions

View File

@ -6,7 +6,7 @@ StartLimitBurst=0
[Service] [Service]
Type=oneshot Type=oneshot
Restart=on-failure Restart=on-failure
ExecStart=/bin/bash -c 'echo 80 > /sys/class/power_supply/BAT0/charge_control_end_threshold' ExecStart=/bin/bash -c 'echo 60 > /sys/class/power_supply/BAT0/charge_control_end_threshold'
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -3,10 +3,16 @@
apt: apt:
update_cache: yes update_cache: yes
pkg: pkg:
- rust-all - cmake
- libayatana-appindicator3-1
- libclang-dev - libclang-dev
- libgtk-3-dev
- libglib2.0-dev
- libgdk-pixbuf-2.0-dev
- libpango1.0-dev
- libudev-dev - libudev-dev
- make - make
- rust-all
- name: checkout asusctl repo - name: checkout asusctl repo
git: git:
@ -28,6 +34,6 @@
- name: "Enable service" - name: "Enable service"
become: yes become: yes
ansible.builtin.systemd: ansible.builtin.systemd:
name: asusctl name: asusd
state: started state: started
enabled: yes enabled: yes

View File

@ -10,24 +10,17 @@
- name: checkout supergfxctl repo - name: checkout supergfxctl repo
git: git:
repo: "{{ asusctl.repo }}" repo: "{{ supergfxctl.repo }}"
dest: "{{ ansible_user_dir }}/src/supergfxctl" dest: "{{ ansible_user_dir }}/src/supergfxctl"
clone: yes clone: yes
update: yes update: yes
- name: build asusctl - name: build supergfxctl
make: make:
chdir: "{{ ansible_user_dir }}/src/supergfxctl" chdir: "{{ ansible_user_dir }}/src/supergfxctl"
- name: install asusctl - name: install supergfxctl
become: yes become: yes
make: make:
chdir: "{{ ansible_user_dir }}/src/supergfxctl" chdir: "{{ ansible_user_dir }}/src/supergfxctl"
target: install target: install
- name: "Enable service"
become: yes
ansible.builtin.systemd:
name: asusctl
state: started
enabled: yes