Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f0efcff07f | |||
| 7280e186dd | |||
| f8d3ba4327 | |||
| 251d8795ea | |||
| 33cfff35b7 | |||
| 5e5aac70fa | |||
| ed79033f44 | |||
| c87fa90e62 | |||
| 9377f60b7d | |||
| 8c2e8d5e08 | |||
| b56434f44e | |||
| ddef5769ee | |||
| 6dd30696b4 | |||
| f89cb7e93b | |||
| 28b7cb428b | |||
| e6057713f9 | |||
| 855c2c0a2d | |||
| af5ab1f3bd | |||
| 5672ff56d2 | |||
| 817c79b149 | |||
| 2d035374fb | |||
| 4940f479a1 | |||
| 81e5b3cb32 | |||
| e60d9d2a70 | |||
| 9e80909bef | |||
| 49406fd2d4 | |||
| 37ccae4552 | |||
| 453c9fb7e2 | |||
| 601d06c1a2 | |||
| ea28dc87ba | |||
| 834f8f4e40 | |||
| 784ccbead8 | |||
| 88a3719a16 | |||
| 9a588bbaaf | |||
| f1365c1967 | |||
| e23b7d2a8a | |||
| e590805570 | |||
| f64775dd68 | |||
| 88d844e364 | |||
| b48b4fc330 | |||
| 25221d9178 | |||
| d91a1fd564 | |||
| 4b5d2e7f70 | |||
| 0c8e7639ca | |||
| 633f20cb76 | |||
| 645250fac6 | |||
| 6433f98d88 | |||
| 398d8ef10f | |||
| d7d5527136 | |||
| 46c91b2801 | |||
| 55338e4218 | |||
| 6fc1b69af5 | |||
| a407b847f6 | |||
| a3a630b984 | |||
| 29cba7893a | |||
| e6c51c0c51 | |||
| 1c4455242b | |||
| d54e836c4e | |||
| eb5662a0c7 | |||
| 02e0a85660 | |||
| 56528fce84 |
@ -1 +1 @@
|
|||||||
http://xplayer-ota.pureroad.cn/files_20251001_081122.tar.xz
|
http://xplayer-ota.pureroad.cn/files_20251203_232832.tar.xz
|
||||||
|
|||||||
@ -1,12 +1,78 @@
|
|||||||
- name: Configure Xplayer Server
|
- name: Configure Xplayer Server
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
vars:
|
||||||
|
packages: "bluez \
|
||||||
|
mpc \
|
||||||
|
libasound2-dev \
|
||||||
|
libudev-dev \
|
||||||
|
libfmt-dev \
|
||||||
|
libfmt9 \
|
||||||
|
libchromaprint1 \
|
||||||
|
libupnp17 \
|
||||||
|
libnfs14 \
|
||||||
|
libavutil58 \
|
||||||
|
libavformat60 \
|
||||||
|
libavcodec60 \
|
||||||
|
libcdio-paranoia2 \
|
||||||
|
libcdio-cdda2 \
|
||||||
|
libcdio19 \
|
||||||
|
libmms0 \
|
||||||
|
libsoxr0 \
|
||||||
|
libid3tag0 \
|
||||||
|
libiso9660-11 \
|
||||||
|
libzzip-0-13 \
|
||||||
|
libao4 \
|
||||||
|
libjack-jackd2-0 \
|
||||||
|
libpipewire-0.3-0 \
|
||||||
|
libpulse0 \
|
||||||
|
libshout3 \
|
||||||
|
libsndio7.0 \
|
||||||
|
libopenal1 \
|
||||||
|
libavahi-common3 \
|
||||||
|
libavahi-client3 \
|
||||||
|
libadplug-2.3.3-0 \
|
||||||
|
libflac12 \
|
||||||
|
libfluidsynth3 \
|
||||||
|
libaudiofile1 \
|
||||||
|
libfaad2 \
|
||||||
|
libgme0 \
|
||||||
|
libmad0 \
|
||||||
|
libmikmod3 \
|
||||||
|
libmodplug1 \
|
||||||
|
libmpcdec6 \
|
||||||
|
libmpg123-0 \
|
||||||
|
libopus0 \
|
||||||
|
libsndfile1 \
|
||||||
|
libogg0 \
|
||||||
|
libvorbis0a \
|
||||||
|
libwavpack1 \
|
||||||
|
libwildmidi2 \
|
||||||
|
libvorbisenc2 \
|
||||||
|
libmp3lame0 \
|
||||||
|
libtwolame0 \
|
||||||
|
libshine3 \
|
||||||
|
net-tools \
|
||||||
|
libconfig9 \
|
||||||
|
avahi-daemon
|
||||||
|
libdbus-1-3 \
|
||||||
|
libglib2.0-0 \
|
||||||
|
libbluetooth3 \
|
||||||
|
libsbc1 \
|
||||||
|
libfdk-aac2 \
|
||||||
|
libldacbt-abr2 \
|
||||||
|
libldacbt-enc2 \
|
||||||
|
aria2 \
|
||||||
|
cloud-guest-utils"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: update script
|
- name: update script
|
||||||
shell:
|
shell:
|
||||||
cmd: |
|
cmd: |
|
||||||
rm -rf /etc/apt/sources.list.d/jean-francois-dockes-ubuntu-upnpp1-noble.sources
|
/usr/bin/install_bluealsa_openaptx.sh
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: switch mirror
|
- name: switch mirror
|
||||||
copy:
|
copy:
|
||||||
src: ../files/sources.list.d/
|
src: ../files/sources.list.d/
|
||||||
@ -14,75 +80,73 @@
|
|||||||
mode: '0644'
|
mode: '0644'
|
||||||
tags: apt
|
tags: apt
|
||||||
|
|
||||||
- name: install dependencies
|
- name: check missing packages
|
||||||
apt:
|
|
||||||
name:
|
|
||||||
- bluez
|
|
||||||
- mpc
|
|
||||||
- libasound2-dev
|
|
||||||
- libudev-dev
|
|
||||||
- libfmt-dev
|
|
||||||
- libfmt9
|
|
||||||
- libchromaprint1
|
|
||||||
- libupnp17
|
|
||||||
- libnfs14
|
|
||||||
- libavutil58
|
|
||||||
- libavformat60
|
|
||||||
- libavcodec60
|
|
||||||
- libcdio-paranoia2
|
|
||||||
- libcdio-cdda2
|
|
||||||
- libcdio19
|
|
||||||
- libmms0
|
|
||||||
- libsoxr0
|
|
||||||
- libid3tag0
|
|
||||||
- libiso9660-11
|
|
||||||
- libzzip-0-13
|
|
||||||
- libao4
|
|
||||||
- libjack-jackd2-0
|
|
||||||
- libpipewire-0.3-0
|
|
||||||
- libpulse0
|
|
||||||
- libshout3
|
|
||||||
- libsndio7.0
|
|
||||||
- libopenal1
|
|
||||||
- libavahi-common3
|
|
||||||
- libavahi-client3
|
|
||||||
- libadplug-2.3.3-0
|
|
||||||
- libflac12
|
|
||||||
- libfluidsynth3
|
|
||||||
- libaudiofile1
|
|
||||||
- libfaad2
|
|
||||||
- libgme0
|
|
||||||
- libmad0
|
|
||||||
- libmikmod3
|
|
||||||
- libmodplug1
|
|
||||||
- libmpcdec6
|
|
||||||
- libmpg123-0
|
|
||||||
- libopus0
|
|
||||||
- libsndfile1
|
|
||||||
- libogg0
|
|
||||||
- libvorbis0a
|
|
||||||
- libwavpack1
|
|
||||||
- libwildmidi2
|
|
||||||
- libvorbisenc2
|
|
||||||
- libmp3lame0
|
|
||||||
- libtwolame0
|
|
||||||
- libshine3
|
|
||||||
- net-tools
|
|
||||||
- libconfig9
|
|
||||||
- avahi-daemon
|
|
||||||
# - bluez-alsa-utils
|
|
||||||
# - upmpdcli
|
|
||||||
state: present
|
|
||||||
cache_valid_time: 3153600 # 365天缓存
|
|
||||||
update_cache: no
|
|
||||||
become: yes
|
|
||||||
tags: apt
|
|
||||||
- name: uninstall bluez-alsa-utils
|
|
||||||
shell:
|
shell:
|
||||||
cmd: apt remove -y bluez-alsa-utils
|
cmd: |
|
||||||
become: yes
|
MISSING=""
|
||||||
|
for pkg in {{ packages }}; do
|
||||||
|
# 先检查原包名
|
||||||
|
if dpkg-query -W -f='${Status}' "$pkg" 2>/dev/null | grep -q "install ok installed"; then
|
||||||
|
continue
|
||||||
|
# 如果原包名不存在,尝试检查带 t64 后缀的版本
|
||||||
|
elif dpkg-query -W -f='${Status}' "${pkg}t64" 2>/dev/null | grep -q "install ok installed"; then
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
MISSING="yes"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ -n "$MISSING" ]; then
|
||||||
|
echo "missing"
|
||||||
|
else
|
||||||
|
echo "all_installed"
|
||||||
|
fi
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
register: package_check
|
||||||
|
changed_when: false
|
||||||
|
ignore_errors: yes
|
||||||
tags: apt
|
tags: apt
|
||||||
|
|
||||||
|
- name: update apt cache
|
||||||
|
shell:
|
||||||
|
cmd: |
|
||||||
|
if command -v apt-fast &> /dev/null; then
|
||||||
|
apt-fast update -y || apt-get update -y
|
||||||
|
else
|
||||||
|
apt-get update -y
|
||||||
|
fi
|
||||||
|
when: package_check.stdout == "missing"
|
||||||
|
ignore_errors: yes
|
||||||
|
tags: apt
|
||||||
|
|
||||||
|
- name: install dependencies
|
||||||
|
shell:
|
||||||
|
cmd: |
|
||||||
|
if command -v apt-fast &> /dev/null; then
|
||||||
|
apt-fast install -y {{ packages }} || apt-get install -y {{ packages }}
|
||||||
|
else
|
||||||
|
apt-get install -y {{ packages }}
|
||||||
|
fi
|
||||||
|
when: package_check.stdout == "missing"
|
||||||
|
ignore_errors: yes
|
||||||
|
tags: apt
|
||||||
|
|
||||||
|
- name: Create directories
|
||||||
|
file:
|
||||||
|
path: "{{ item.path }}"
|
||||||
|
state: directory
|
||||||
|
mode: "{{ item.mode | default('0755') }}"
|
||||||
|
recurse: yes
|
||||||
|
loop:
|
||||||
|
- path: /var/lib/mpd/playlists
|
||||||
|
- path: /var/lib/mpd/music
|
||||||
|
- path: /usr/local/lib/systemd/system
|
||||||
|
- path: /srv/login
|
||||||
|
- path: /usr/var/lib/bluealsa
|
||||||
|
- path: /srv/bluez-alsa
|
||||||
|
|
||||||
|
|
||||||
- name: Copy static files
|
- name: Copy static files
|
||||||
copy:
|
copy:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
@ -119,17 +183,12 @@
|
|||||||
- src: ../files/xplayer-start.sh
|
- src: ../files/xplayer-start.sh
|
||||||
dest: /usr/local/bin/xplayer-start.sh
|
dest: /usr/local/bin/xplayer-start.sh
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
- src: ../files/apt-fast
|
||||||
- name: Create directories
|
dest: /usr/local/bin/apt-fast
|
||||||
file:
|
mode: '0755'
|
||||||
path: "{{ item.path }}"
|
- src: ../files/apt-fast.conf
|
||||||
state: directory
|
dest: /etc/apt-fast.conf
|
||||||
mode: "{{ item.mode | default('0755') }}"
|
mode: '0644'
|
||||||
loop:
|
|
||||||
- path: /var/lib/mpd/playlists
|
|
||||||
- path: /var/lib/mpd/music
|
|
||||||
- path: /usr/local/lib/systemd/system
|
|
||||||
- path: /srv/login
|
|
||||||
|
|
||||||
- name: update mpd data
|
- name: update mpd data
|
||||||
copy:
|
copy:
|
||||||
@ -176,6 +235,29 @@
|
|||||||
register: copy_result
|
register: copy_result
|
||||||
changed_when: copy_result.changed or (force_update | default(false) | bool)
|
changed_when: copy_result.changed or (force_update | default(false) | bool)
|
||||||
|
|
||||||
|
- name: update bluealsa
|
||||||
|
copy:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
mode: "{{ item.mode | default('0644') }}"
|
||||||
|
loop:
|
||||||
|
- src: ../files/bluealsa.service
|
||||||
|
dest: /etc/systemd/system/bluealsa.service
|
||||||
|
- src: ../files/install_bluealsa_openaptx.sh
|
||||||
|
dest: /usr/bin/install_bluealsa_openaptx.sh
|
||||||
|
mode: '0755'
|
||||||
|
- src: ../files/bluealsa_bundle.tar.gz
|
||||||
|
dest: /srv/bluez-alsa/bluealsa_bundle.tar.gz
|
||||||
|
tags: bluealsa
|
||||||
|
notify:
|
||||||
|
- install_bluealsa_openaptx
|
||||||
|
- reload_systemd
|
||||||
|
- enable_bluealsa
|
||||||
|
- stop_bluealsa
|
||||||
|
- start_bluealsa
|
||||||
|
register: copy_result
|
||||||
|
changed_when: copy_result.changed or (force_update | default(false) | bool)
|
||||||
|
|
||||||
- name: update camilladsp
|
- name: update camilladsp
|
||||||
copy:
|
copy:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
@ -217,6 +299,7 @@
|
|||||||
mode: '0755'
|
mode: '0755'
|
||||||
- src: ../files/99-usb-auto-mount.rules
|
- src: ../files/99-usb-auto-mount.rules
|
||||||
dest: /etc/udev/rules.d/99-usb-auto-mount.rules
|
dest: /etc/udev/rules.d/99-usb-auto-mount.rules
|
||||||
|
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
tags: usb
|
tags: usb
|
||||||
notify:
|
notify:
|
||||||
@ -385,6 +468,23 @@
|
|||||||
shell:
|
shell:
|
||||||
cmd: systemctl restart sing-box
|
cmd: systemctl restart sing-box
|
||||||
|
|
||||||
|
- name: install_bluealsa_openaptx
|
||||||
|
shell:
|
||||||
|
cmd: /usr/bin/install_bluealsa_openaptx.sh
|
||||||
|
|
||||||
|
- name: enable_bluealsa
|
||||||
|
shell:
|
||||||
|
cmd: systemctl enable bluealsa
|
||||||
|
- name: stop_bluealsa
|
||||||
|
shell:
|
||||||
|
cmd: systemctl stop bluealsa
|
||||||
|
- name: start_bluealsa
|
||||||
|
shell:
|
||||||
|
cmd: systemctl start bluealsa
|
||||||
|
- name: restart_bluealsa
|
||||||
|
shell:
|
||||||
|
cmd: systemctl restart bluealsa
|
||||||
|
|
||||||
- name: enable_xplayer_server
|
- name: enable_xplayer_server
|
||||||
shell:
|
shell:
|
||||||
cmd: systemctl enable xplayer-server
|
cmd: systemctl enable xplayer-server
|
||||||
@ -399,6 +499,7 @@
|
|||||||
|
|
||||||
- name: reboot_required
|
- name: reboot_required
|
||||||
shell:
|
shell:
|
||||||
cmd: echo "need reboot"
|
cmd: sync && reboot
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
5
sync.sh
5
sync.sh
@ -33,6 +33,11 @@ rsync 5c:/etc/systemd/system/sing-box.service files/sing-box.service
|
|||||||
rsync -avz --exclude='login/' 5c:/srv/login/ files/login/
|
rsync -avz --exclude='login/' 5c:/srv/login/ files/login/
|
||||||
rsync 5c:/usr/bin/led-startup.sh files/led-startup.sh
|
rsync 5c:/usr/bin/led-startup.sh files/led-startup.sh
|
||||||
rsync 5c:/usr/local/bin/xplayer-start.sh files/xplayer-start.sh
|
rsync 5c:/usr/local/bin/xplayer-start.sh files/xplayer-start.sh
|
||||||
|
rsync 5c:/usr/bin/install_bluealsa_openaptx.sh files/install_bluealsa_openaptx.sh
|
||||||
|
rsync 5c:/etc/systemd/system/bluealsa.service files/bluealsa.service
|
||||||
|
rsync 5c:/srv/bluez-alsa/bluealsa_bundle.tar.gz files/bluealsa_bundle.tar.gz
|
||||||
|
rsync 5c:/usr/local/bin/apt-fast files/apt-fast
|
||||||
|
rsync 5c:/etc/apt-fast.conf files/apt-fast.conf
|
||||||
|
|
||||||
# Clean up macOS resource fork files
|
# Clean up macOS resource fork files
|
||||||
find files -name "._*" -type f -delete
|
find files -name "._*" -type f -delete
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user