diff options
author | Jamie Tanna | 2016-06-24 18:40:03 +0100 |
---|---|---|
committer | Jamie Tanna | 2016-06-24 19:36:46 +0100 |
commit | c55c95c6a52110811e9aff126141a608d9a7d003 (patch) | |
tree | 1a0808edee50ce03c5574e777ced16eaa2b2b6a4 | |
parent | 2aa309032d76be6dcfff345decf63671973308ce (diff) | |
download | aur-c55c95c6a52110811e9aff126141a608d9a7d003.tar.gz |
Add user-level systemd unit file
-rw-r--r-- | PKGBUILD | 7 | ||||
-rw-r--r-- | youtube-mpv.service | 13 |
2 files changed, 18 insertions, 2 deletions
@@ -11,10 +11,12 @@ depends=('youtube-dl' 'python') makedepends=() # TODO store config per user? source=("git+https://github.com/agiz/youtube-mpv" - "youtube-mpv@.service") + "youtube-mpv@.service" + "youtube-mpv.service") noextract=() md5sums=('SKIP' - 'a4d0fad3b31b5ed17bb58e90af2f7d14') + 'a4d0fad3b31b5ed17bb58e90af2f7d14' + '8c7883fb1ac0dd4376cbaf0ee46848e3') pkgver() { cd "$srcdir/$_pkgname" @@ -23,6 +25,7 @@ pkgver() { package() { install -D -m644 "$_pkgname/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -D -m644 "youtube-mpv.service" "${pkgdir}/usr/lib/systemd/user/youtube-mpv.service" install -D -m644 "youtube-mpv@.service" "${pkgdir}/usr/lib/systemd/system/youtube-mpv@.service" install -D -m644 "$_pkgname/ytdl_config.py" "${pkgdir}/opt/${pkgname}/ytdl_config.py" diff --git a/youtube-mpv.service b/youtube-mpv.service new file mode 100644 index 000000000000..5bfcf22d6892 --- /dev/null +++ b/youtube-mpv.service @@ -0,0 +1,13 @@ +[Unit] +Description=Youtube-mpv + +[Service] +Type=simple +Environment=DISPLAY=:0 +ExecStart=/opt/youtube-mpv-git/ytdl_server.py +ExecReload=/bin/kill -HUP $MAINPID +KillMode=process +Restart=on-failure + +[Install] +WantedBy=default.target |