From 15544d8899c480ba76d3a635d9741ff87068bfb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Wed, 12 Feb 2020 17:44:22 +0100 Subject: [PATCH] change options --- workdirfs.conf | 3 +-- workdirfs.py | 4 ++-- workdirfs.service | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/workdirfs.conf b/workdirfs.conf index 777fd37..e619156 100644 --- a/workdirfs.conf +++ b/workdirfs.conf @@ -1,5 +1,4 @@ ARCHIVE=${HOME}/archive MOUNTPOINT=${HOME}/Work TIMEOFFSET=2 -MONTHLYDIR=False -YEARLYDIR=False +OTHER_OPTIONS="-y -M" diff --git a/workdirfs.py b/workdirfs.py index 2604b15..58461a5 100755 --- a/workdirfs.py +++ b/workdirfs.py @@ -228,8 +228,8 @@ if __name__ == '__main__': all day till 3 o'clock in the morning, set it to 4, so next day archive-dir will be created 4 hours after midnight. You have 1h tolerance, if you're working one day a little bit longer""") - parser.add_argument("-y", "--yearlydir", action="store_false") - parser.add_argument("-M", "--monthlydir", action="store_false") + parser.add_argument("-y", "--yearlydir", action="store_true") + parser.add_argument("-M", "--monthlydir", action="store_true") args = parser.parse_args() print(args) #root = os.environ['HOME']+'/archive' diff --git a/workdirfs.service b/workdirfs.service index ce58444..b76893e 100644 --- a/workdirfs.service +++ b/workdirfs.service @@ -4,5 +4,5 @@ Description=Daily working directory ~/Work [Service] EnvironmentFile=/etc/workdirfs.conf EnvironmentFile=-%h/.config/workdirfs.conf -ExecStart=/usr/bin/python3 -u /usr/local/bin/workdirfs.py --archive ${ARCHIVE} --mountpoint ${MOUNTPOINT} --timeoffset ${TIMEOFFSET} --yearlydir ${YEARLYDIR} --monthlydir ${MONTHLYDIR} +ExecStart=/usr/bin/python3 -u /usr/local/bin/workdirfs.py --archive ${ARCHIVE} --mountpoint ${MOUNTPOINT} --timeoffset ${TIMEOFFSET} ${OTHER_OPTIONS} ExecStop=/usr/bin/fusermount -u ${MOUNTPOINT}