Useful Scripts
Collection of useful scripts for Windows and Linux
ProfessorShroom š Scripts
Just a useful collection of scripts for Linux and Windows.
Docker
- dockerInstallPi.sh - Install Docker on a Raspberry Pi
- dockerInstallUbuntu.sh - Install Docker on Ubuntu
- updateDockerContainers.sh - Updates all Docker containers, assuming all are held within the same directory
For example, if all containers are held within /mnt/docker/ you just add the name of the subfolder
Change the following line to your Docker directorydockerDir="/path/to/docker/containers"and then input your containers like belowcontainers=" Jellyfin Radarr SABnzbd Sonarr "
MergerFS
- mergerFSBalance.sh - Balances my MergerFS volume, but excludes a directory on one of the drives I do not want balanced
-e /mnt/drive1/Docker/means that the Docker folder within drive 1 is excluded from the balance process
Metadata
- removeImgMetadata.sh - Removes metadata from all images
You set the directory by changingTARGET_DIR="$BASE_DIR/location/of/images"
Leave$BASE_DIRwill run a relative path from the location of the script, removing it will allow you to input an absolute path
Will install exiftool if not already installed - removeImgMetadata.ps1 - Exactly the same as above, but for Windows
Nextcloud
-
nextcloudSync.sh - Runs a two-way Nextcloud sync to a specified location.
ChangeWATCH_DIR="/path/to/Nextcloud"to change the location of Nextcloud on the local drive -
nextcloudService.service - SystemD service file for the above script
Only errors are logged to avoid clogging up the log file
ChangeRequiresMountsFor=/path/to/nextcloudto the drive that the Nextcloud folder is located in
Change/path/to/nextcloudSync.shunder ExecStart to wherever the script is located
ChangeUser=userto your username
ChangeEnvironmentFile=/home/user/nextcloud.envto the location of your env file -
nextcloudService.timer - SystemD service timer file for the above script, this is delayed for 2 minutes after booting and will run every 5 minutes unless an instance is already running
-
nextcloud.env - Environment file containing your credentials
ChangeREMOTE="https://username:password@nextcloud.domain.com"to suit your username, password (app password if using MFA), and Nextcloud domain
Iād suggest locking it by runningsudo chmod 600andsudo chown root:rooton the file after entering your credentials
Windows
- ClearFileExplorer.vbs - Clears the file explorer history
- EmptyRecycleBin.vbs - Empties the recycle bin