#!/bin/bash


new_line="#xserver-command=X -nocursor"
file_path="/etc/lightdm/lightdm.conf"

# 检查文件中是否已存在相同的行
if ! grep -qF "$new_line" "$file_path"; then
  # 如果不存在，将新行添加到文件开头
  echo -e "$new_line\n$(cat $file_path)" > $file_path
fi

sudo cp aiplayer.service /etc/systemd/system/aiplayer.service
sudo systemctl enable aiplayer.service
sudo systemctl start aiplayer.service
