just some notes so that I dont forget what I want to do

This commit is contained in:
Sebastian
2023-03-05 22:03:59 +01:00
parent 57b27c6a03
commit b3769f1583

View File

@@ -1 +1,81 @@
# Jenkins # Jenkins
## Current cd rip process:
udev rule
```bash
#/etc/udev/rules.d/99-cd-audio-rip.rules
SUBSYSTEM=="block",KERNEL=="sr0",ACTION=="change",RUN+="/bin/systemctl start ripper"
```
ripper service
```bash
#/etc/systemd/system/ripper.service
[Unit]
Description=Auto CD ripper
[Service]
Type=oneshot
ExecStart=/root/scripts/rip.sh
[Install]
WantedBy=multi-user.target
~
```
ripping script
```bash
#!/bin/bash
LOCKDIR=rip.lock
LOGFILE=/var/log/cd-rip.log
function cleanup {
if rmdir $LOCKDIR; then
echo "Finished $(date)" >> $LOGFILE
else
echo "Failed to remove lock dir '$LOCKDIR'" >> $LOGFILE
exit 1
fi
}
if mkdir $LOCKDIR; then
trap "cleanup" EXIT
echo "Acquired Lock, running" >> $LOGFILE
echo "Started $(date) $$" >> $LOGFILE
abcde -c /root/.abcde.conf
#trigger LMS rescan
#wget -q --spider http://localhost:9000/settings/index.html?p0=rescan
echo "Stopped $(date) $$" >> $LOGFILE
# optional notifications, uncomment if needed
# echo "Sending IFFT webhook:">>$LOGFILE
# /home/phil/dev/ifttt_send.sh "Ripper done. Please eject CD" >> $LOGFILE
# send the logfile by email, you need to configure mail first for this to work
# cat $LOGFILE | mail -s "Ripper log" your_email@example.com
else
echo "Could not create lock, already running? '$LOCKDIR'"
exit 1
fi
```
## Concept CD-Ripping
* udev rule triggers Jenkins Pipeline
* udev rule listens on cd insert
* Pipeline starts the cd-ripping process, ensure the music is properly tagged
* after ripping is done, it is placed in the correct folder -> tbd
* create mpd playlist to be placed on volumio server (192.168.2.43)
## Concept Bandcamp Downloader
* periodical run of docker container that syncs bandcamp account with local folders
* ???
## To-Do