Skip to content

Commit

Permalink
Update Makefile to resolve incorrect systemd installation location(s)…
Browse files Browse the repository at this point in the history
… Issue #188 (#189)

* Update makefile to fix systemd install locations
* Update makefile to fix systemd uninstall locations
  • Loading branch information
abraunegg committed Oct 7, 2018
1 parent 3ef1cea commit d1d3c8a
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions Makefile
Expand Up @@ -35,19 +35,22 @@ install: all
install -D onedrive $(DESTDIR)$(PREFIX)/bin/onedrive
install -D -m 644 logrotate/onedrive.logrotate $(DESTDIR)/etc/logrotate.d/onedrive
ifeq ($(RHEL),1)
mkdir -p $(DESTDIR)/etc/systemd/system/
chown root.root $(DESTDIR)/etc/systemd/system/
chmod 0755 $(DESTDIR)/etc/systemd/system/
cp -raf *.service $(DESTDIR)/etc/systemd/system/
chmod 0644 $(DESTDIR)/etc/systemd/system/onedrive*.service
mkdir -p $(DESTDIR)/usr/lib/systemd/system/
chown root.root $(DESTDIR)/usr/lib/systemd/system/
chmod 0755 $(DESTDIR)/usr/lib/systemd/system/
cp -raf *.service $(DESTDIR)/usr/lib/systemd/system/
chmod 0644 $(DESTDIR)/usr/lib/systemd/system/onedrive*.service
else
mkdir -p $(DESTDIR)/usr/lib/systemd/user/
chown root.root $(DESTDIR)/usr/lib/systemd/user/
chmod 0755 $(DESTDIR)/usr/lib/systemd/user/
cp -raf onedrive.service $(DESTDIR)/usr/lib/systemd/user/
chmod 0644 $(DESTDIR)/usr/lib/systemd/user/onedrive.service
cp -raf onedrive@.service $(DESTDIR)/etc/systemd/system/
chmod 0644 $(DESTDIR)/etc/systemd/system/onedrive@.service
mkdir -p $(DESTDIR)/usr/lib/systemd/system/
chown root.root $(DESTDIR)/usr/lib/systemd/system/
chmod 0755 $(DESTDIR)/usr/lib/systemd/system/
cp -raf onedrive@.service $(DESTDIR)/usr/lib/systemd/system/
chmod 0644 $(DESTDIR)/usr/lib/systemd/system/onedrive@.service
endif

onedrive: version $(SOURCES)
Expand All @@ -61,11 +64,10 @@ uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/onedrive
rm -f $(DESTDIR)/etc/logrotate.d/onedrive
ifeq ($(RHEL),1)
rm -f $(DESTDIR)/etc/systemd/system/onedrive.service
rm -f $(DESTDIR)/etc/systemd/system/onedrive@.service
rm -f $(DESTDIR)/usr/lib/systemd/system/onedrive*.service
else
rm -f $(DESTDIR)/usr/lib/systemd/user/onedrive.service
rm -f $(DESTDIR)/usr/lib/systemd/user/onedrive@.service
rm -f $(DESTDIR)/usr/lib/systemd/system/onedrive@.service
endif

version: .git/HEAD .git/index
Expand Down

0 comments on commit d1d3c8a

Please sign in to comment.