19 lines
596 B
SYSTEMD
19 lines
596 B
SYSTEMD
#
|
|
# Note that two different ALSA card state management schemes exist and they
|
|
# can be switched using a file exist check - /etc/alsa/state-daemon.conf .
|
|
#
|
|
|
|
[Unit]
|
|
Description=Save/Restore Sound Card State
|
|
ConditionPathExists=!/etc/alsa/state-daemon.conf
|
|
ConditionPathExistsGlob=/dev/snd/control*
|
|
ConditionPathExists=/etc/voicecard/asound.state
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=true
|
|
ExecStartPre=/bin/mkdir -p /run/alsa
|
|
ExecStart=-/usr/sbin/alsactl -E HOME=/run/alsa -f /etc/voicecard/asound.state restore
|
|
ExecStop=-/usr/sbin/alsactl -E HOME=/run/alsa -f /etc/voicecard/asound.state store
|
|
|