When install check for systemd sym links before making them

stable
Justin Reichardt 2022-06-12 20:45:34 -05:00
parent 3f446fbaca
commit 1c2888ab9f
1 changed files with 9 additions and 3 deletions

View File

@ -30,9 +30,15 @@ build-win:
install: build
install -D $(PROJROOT)build/bin/rhosts $(BINDIR)/
cp -r $(PROJROOT)build/share/rhosts $(DATADIR)
ln -s $(DATADIR)rhosts/systemd/rhosts.service /usr/lib/systemd/system/rhosts.service
ln -s $(DATADIR)rhosts/systemd/rhosts.path /usr/lib/systemd/system/rhosts.path
ln -s $(DATADIR)rhosts/systemd/rhosts.timer /usr/lib/systemd/system/rhosts.timer
if [ ! -h /usr/lib/systemd/system/rhosts.service ]; then \
ln -s $(DATADIR)rhosts/systemd/rhosts.service /usr/lib/systemd/system/rhosts.service \
;fi
if [ ! -h /usr/lib/systemd/system/rhosts.path ]; then \
ln -s $(DATADIR)rhosts/systemd/rhosts.path /usr/lib/systemd/system/rhosts.path \
;fi
if [ ! -h /usr/lib/systemd/system/rhosts.timer ]; then \
ln -s $(DATADIR)rhosts/systemd/rhosts.timer /usr/lib/systemd/system/rhosts.timer \
;fi
uninstall:
if [ -f $(BINDIR)/rhosts ]; then \
rm $(BINDIR)/rhosts \