mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-19 14:16:36 +02:00
Update Makefile and systemd files
* Change the ordering of 'make install' so that directories and permissions are set first * Use wildcard to copy service files to systemd directory as 'install' was failing when there was @ in the script * Update systemd units files based on https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ for starting the onedrive service
This commit is contained in:
parent
63f991a64e
commit
da9cc628cb
8
Makefile
8
Makefile
|
@ -22,14 +22,12 @@ clean:
|
|||
rm -f onedrive onedrive.o onedrive.service
|
||||
|
||||
install: all
|
||||
install -D onedrive $(DESTDIR)$(PREFIX)/bin/onedrive
|
||||
install -D -m 644 onedrive.service $(DESTDIR)/usr/lib/systemd/user/onedrive.service
|
||||
install -D -m 644 onedrive@.service $(DESTDIR)/usr/lib/systemd/user/onedrive@.service
|
||||
install -D -m 644 logrotate/onedrive.logrotate /etc/logrotate.d/onedrive
|
||||
mkdir -p /var/log/onedrive
|
||||
chown root.users /var/log/onedrive
|
||||
chmod 0775 /var/log/onedrive
|
||||
rm -f ~/.config/onedrive/items.sqlite3
|
||||
install -D onedrive $(DESTDIR)$(PREFIX)/bin/onedrive
|
||||
install -D -m 644 logrotate/onedrive.logrotate /etc/logrotate.d/onedrive
|
||||
chmod 0644 $(DESTDIR)/usr/lib/systemd/user/onedrive*.service
|
||||
|
||||
onedrive: version $(SOURCES)
|
||||
$(DC) $(DFLAGS) $(SOURCES)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[Unit]
|
||||
Description=OneDrive Free Client
|
||||
Documentation=https://github.com/skilion/onedrive
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=@PREFIX@/bin/onedrive --monitor
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[Unit]
|
||||
Description=OneDrive Free Client for %i
|
||||
Documentation=https://github.com/skilion/onedrive
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=@PREFIX@/bin/onedrive --monitor --confdir=/home/%i/.config/onedrive
|
||||
|
|
Loading…
Reference in a new issue