workdirfs/setup.sh

17 lines
557 B
Bash
Raw Normal View History

2020-02-11 15:14:26 +01:00
#!/bin/sh
2020-03-22 05:43:40 +01:00
FUSERMOUNT=$(which fusermount)
echo $FUSERMOUNT
2020-02-13 15:31:09 +01:00
. ./uninstall.sh
echo "Install workdirfs for all users"
2020-02-11 15:14:26 +01:00
sudo cp workdirfs.py /usr/local/bin/workdirfs.py
sudo cp workdirfs.service /etc/systemd/user/workdirfs.service
2020-03-22 05:43:40 +01:00
echo replace
sudo sed -i -e "s@%FUSERMOUNT%@${FUSERMOUNT}@" /etc/systemd/user/workdirfs.service
echo replaced
2020-02-11 17:07:59 +01:00
sudo mkdir -pv /etc/systemd/user/default.target.wants/
2020-02-11 15:14:26 +01:00
sudo ln -sf ../workdirfs.service /etc/systemd/user/default.target.wants/workdirfs.service
systemctl --user daemon-reload
systemctl --user restart workdirfs.service