summarylogtreecommitdiffstats
path: root/megasyncd.service
diff options
context:
space:
mode:
Diffstat (limited to 'megasyncd.service')
-rw-r--r--megasyncd.service15
1 files changed, 15 insertions, 0 deletions
diff --git a/megasyncd.service b/megasyncd.service
new file mode 100644
index 00000000000..1631285b03e
--- /dev/null
+++ b/megasyncd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=MEGASync client
+After=local-fs.target network.target
+
+[Service]
+Type=simple
+EnvironmentFile=/etc/conf.d/megasync.conf
+ExecStart=/usr/bin/bash -c "cd $MEGA_WORK_DIR && /usr/bin/megasimplesync $MEGA_LOCAL_DIR $MEGA_REMOTE_DIR"
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=process
+Restart=on-failure
+RestartSec=30s
+
+[Install]
+WantedBy=multi-user.target