change configs

This commit is contained in:
Jakobus Schürz 2020-02-12 17:30:08 +01:00
parent 813871beee
commit b18e8042b5
5 changed files with 14 additions and 5 deletions

View file

@ -4,5 +4,7 @@ sudo cp workdirfs.py /usr/local/bin/workdirfs.py
cp workdirfs.service ~/.config/systemd/user/workdirfs.service
sudo mkdir -pv ~/.config/systemd/user/default.target.wants/
sudo ln -sf ../workdirfs.service ~/.config/systemd/user/default.target.wants/workdirfs.service
cp workdirfs.config ~/.config/workdirfs.conf
sudo cp workdirfs.config /etc/workdirfs.conf
systemctl --user daemon-reload
systemctl --user restart workdirfs.service

View file

@ -4,5 +4,6 @@ sudo cp workdirfs.py /usr/local/bin/workdirfs.py
sudo cp workdirfs.service /etc/systemd/user/workdirfs.service
sudo mkdir -pv /etc/systemd/user/default.target.wants/
sudo ln -sf ../workdirfs.service /etc/systemd/user/default.target.wants/workdirfs.service
sudo cp workdirfs.config /etc/workdirfs.conf
systemctl --user daemon-reload
systemctl --user restart workdirfs.service

View file

@ -4,6 +4,6 @@ echo "Remove workdirfs"
echo "stop workdirfs.service"
systemctl --user stop workdirfs.service
echo "remove binaries and units from system"
sudo rm -rf /usr/local/bin/workdirfs.py /etc/systemd/user/workdirfs.service /etc/systemd/user/default.target.wants/workdirfs
sudo rm -rf /usr/local/bin/workdirfs.py /etc/workdirfs.conf /etc/systemd/user/workdirfs.service /etc/systemd/user/default.target.wants/workdirfs
echo "remove systemd-units for this user $USER"
rm -rf ~/.config/systemd/user/workdirfs.service ~/.config/systemd/user/default.target.wants/workdirfs.service
rm -rf ~/.config/workdirfs.conf ~/.config/systemd/user/workdirfs.service ~/.config/systemd/user/default.target.wants/workdirfs.service

5
workdirfs.conf Normal file
View file

@ -0,0 +1,5 @@
ARCHIVE=${HOME}/archive
MOUNTPOINT=${HOME}/Work
TIMEOFFSET=2
MONTHLYDIR=False
YEARLYDIR=False

View file

@ -2,6 +2,7 @@
Description=Daily working directory ~/Work
[Service]
Environment=WORKDIRFS_OPTIONS="-a %h/archive -m %h/Work -t 3 -M False -y False"
ExecStart=/usr/bin/python3 -u /usr/local/bin/workdirfs.py ${WORKDIRFS_OPTIONS}
ExecStop=/usr/bin/fusermount -u ${DST}
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}
ExecStop=/usr/bin/fusermount -u ${MOUNTPOINT}