This is a bash script meant to run alongside the docker version of `slskd`, a modern Web-based SoulSeek client. It looks at a certain directory and then scans its contents according to a set interval. Then, when it detects new files, it changes their permissions and ownership automatically, leaving a log entry in the journal.
|
преди 1 месец | |
---|---|---|
LICENSE | преди 1 месец | |
README.md | преди 1 месец | |
install-as-systemd.sh | преди 1 месец | |
slskd-permission-monitor.sh | преди 1 месец | |
slskd-permissions-fixer.service | преди 1 месец |
This is a bash script meant to look at a certain directory and scan its contents according to a set interval. Then, when it detects new files, it changes their permissions and ownership automatically, leaving a log entry in the journal.
To quickstart:
git clone https://git.donaberger.xyz/mitch/slskd-permissions-fixer
cd slskd-permissions-fixer/
sudo chmod +x slskd-permissions-fixer.sh && sudo chmod +x install-as-systemd.sh
Then, either...
4a. Run the script alone (does not run in background): /bin/bash slskd-permissions-fixer.sh
4b. Install it as a systemd
module: /bin/bash install-as-systemd.sh
4c. Copy slskd-permissions-fixer.system
to /etc/systemd/users/slskd-permissions-fixer.system
and then run sudo systemctl daemon-reload && sudo systemctl status slskd-permissions-fixer
Because the Docker container for slskd
does not seem to respect the global Docker flags for active user/guid. So, I did the next best thing, and just had a script run as root and wait for newly downloaded files. Then it updates them according to the parameters set. Also, I am lazy. 🤷