aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Van Gestel2022-04-05 02:19:28 +0200
committerMatthias Van Gestel2022-04-05 02:19:28 +0200
commit83ef306065685a03641dc0af9234ba9a5a97c2a4 (patch)
tree076f81c84114b0cf8279cbc00d8a766eae7b9739
parent16ee94f533a6e298d4b1f4fd45692f74ca59452e (diff)
downloadaur-megasync-headless.tar.gz
Add MEGA_PRE_START_SLEEP
-rw-r--r--megasync.conf3
-rw-r--r--megasyncd@.service2
2 files changed, 4 insertions, 1 deletions
diff --git a/megasync.conf b/megasync.conf
index 913d56b26213..7a4be12fa959 100644
--- a/megasync.conf
+++ b/megasync.conf
@@ -10,3 +10,6 @@ MEGA_REMOTE_DIR="/"
# Your MEGA credentials
MEGA_EMAIL=""
MEGA_PWD=""
+
+# The amount of time the service file will wait to start megasync
+MEGA_PRE_START_SLEEP=45
diff --git a/megasyncd@.service b/megasyncd@.service
index 263a2faa0eff..90bbf0820532 100644
--- a/megasyncd@.service
+++ b/megasyncd@.service
@@ -8,7 +8,7 @@ User=%I
EnvironmentFile=/etc/conf.d/megasync.conf
WorkingDirectory=/tmp/
ExecStartPre=-/usr/bin/mkdir -p $MEGA_LOCAL_DIR
-ExecStartPre=/bin/sleep 45
+ExecStartPre=/bin/sleep $MEGA_PRE_START_SLEEP
ExecStart=/usr/bin/megasimplesync $MEGA_LOCAL_DIR $MEGA_REMOTE_DIR
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process