aboutsummaryrefslogtreecommitdiff
path: root/local
diff options
context:
space:
mode:
Diffstat (limited to 'local')
-rw-r--r--local/services/bt-agent.service18
-rw-r--r--local/services/playlists.service11
-rw-r--r--local/services/rss_playlist.service11
-rw-r--r--local/services/rss_playlist.timer13
4 files changed, 53 insertions, 0 deletions
diff --git a/local/services/bt-agent.service b/local/services/bt-agent.service
new file mode 100644
index 0000000..379634e
--- /dev/null
+++ b/local/services/bt-agent.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Bluetooth Agent
+After=bluetooth.service
+Requires=bluetooth.service
+
+[Service]
+Type=simple
+ExecStartPre=bt-adapter --set Discoverable 1
+#ExecStart=bt-agent -c NoInputNoOutput
+ExecStart=bt-agent -p /etc/bluetooth/pins
+## Restart the service each 60s
+#WatchdogSec=60
+#RestartSec=60
+#Restart=always
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/local/services/playlists.service b/local/services/playlists.service
new file mode 100644
index 0000000..13729ff
--- /dev/null
+++ b/local/services/playlists.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Playlists
+Before=mpd.target
+
+[Service]
+Type=simple
+ExecStart=find /home/ -name '*.m3u' -exec cp {} /home/playlists \;
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/local/services/rss_playlist.service b/local/services/rss_playlist.service
new file mode 100644
index 0000000..87c924a
--- /dev/null
+++ b/local/services/rss_playlist.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=RSS Playlists
+Wants=rss_playlists.timer
+
+[Service]
+Type=simple
+ExecStart=/home/mpd_playlist.sh
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/local/services/rss_playlist.timer b/local/services/rss_playlist.timer
new file mode 100644
index 0000000..df70cb0
--- /dev/null
+++ b/local/services/rss_playlist.timer
@@ -0,0 +1,13 @@
+[Unit]
+Description=Update the RSS playlists every day
+Requires=rss_playlists.service
+
+[Timer]
+Unit=rss_playlists.service
+OnBootSec=1min
+OnUnitInactiveSec=1d
+RandomizedDelaySec=15m
+
+[Install]
+WantedBy=timers.target
+