# Nice chiptune sound when successfully booted and when shutting down.
# Composer: Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de>

[Unit]
Description=Plays chiptune sound at startup and shutdown of the system.
After=networking.service

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/bash -c 'A=440; D=587.3295; G=783.9909; A2=880; /usr/bin/beep -f $D -n -f $A -n -f $D -n -f $G -f $A2 -n -f $G -n -f $A2 -l 300'
ExecStop=/bin/bash -c 'C=261.6256; A=440; D=587.3295; A2=880; /usr/bin/beep -f $A2 -n -f $D -n -f $A -n -f $C -l 400'

[Install]
WantedBy=multi-user.target
WantedBy=network-online.target
