systemd service

This commit is contained in:
Ondrej Zara 2019-04-23 12:31:01 +02:00
parent 6fc62a2599
commit 6b0c513427
7 changed files with 43 additions and 19 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
node_modules
_youtube
cyp.service

32
Makefile Normal file
View File

@ -0,0 +1,32 @@
LESS := $(shell npm bin)/lessc
APP := app
CSS := $(APP)/app.css
ICONS := $(APP)/js/lib/icons.js
SYSD_USER := ~/.config/systemd/user
SERVICE := cyp.service
all: $(CSS)
icons: $(ICONS)
$(ICONS): $(APP)/icons/*
$(APP)/svg2js.sh $(APP)/icons > $@
$(CSS): $(APP)/css/*
$(LESS) $(APP)/css/app.less > $@
service: $(SERVICE)
mkdir -p $(SYSD_USER)
ln -fs $(realpath $^) $(SYSD_USER)/$^
systemctl --user daemon-reload
$(SERVICE): misc/cyp.service.template
cat $^ | envsubst > $@
watch: all
while inotifywait -e MODIFY -r $(APP)/css $(APP)/js ; do make $^ ; done
clean:
rm -f $(SERVICE) $(CSS)
.PHONY: all watch icons service clean

View File

@ -4,7 +4,7 @@ CYP is a web-based frontend for [MPD](https://www.musicpd.org/), the Music Playe
## Screenshots
![](screen1.png) ![](screen2.png)
![](misc/screen1.png) ![](misc/screen2.png)
## Features

View File

@ -1,18 +0,0 @@
LESS := $(shell npm bin)/lessc
APP := app.css
ICONS := js/lib/icons.js
all: $(APP)
icons: $(ICONS)
$(ICONS): icons/*
./svg2js.sh icons > $@
$(APP): css/*
$(LESS) css/app.less > $@
watch: all
while inotifywait -e MODIFY -r css js ; do make $^ ; done
.PHONY: all watch icons

View File

@ -0,0 +1,9 @@
[Unit]
Description=Control Your Player
[Service]
WorkingDirectory=$PWD
ExecStart=node .
[Install]
WantedBy=multi-user.target

View File

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 111 KiB

View File

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 130 KiB