diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2025-06-18 12:06:04 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2025-06-18 12:06:04 +0200 |
commit | 0640b403f2dc33fca3b1ca121012b98c2420ef24 (patch) | |
tree | ad7412b9bf9c24420cab47143004e5891992837f /local/services | |
parent | 8e654849a088d7e2843233e90a0994829de638d0 (diff) |
Moved the systemd configuration in it’s own file
Diffstat (limited to 'local/services')
-rw-r--r-- | local/services/bt-agent.service | 18 | ||||
-rw-r--r-- | local/services/playlists.service | 11 | ||||
-rw-r--r-- | local/services/rss_playlist.service | 11 | ||||
-rw-r--r-- | local/services/rss_playlist.timer | 13 |
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 + |