This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Set UserName | |
echo "Ready to start" | |
read -rp 'UserName: ' uservar | |
echo "$uservar added" | |
#adduser $uservar && echo -e "$userPass\n$userPass\n" | passwd $uservar > /dev/null 2>&1 && echo " User account has been created." || echo " ERR -- User acount creation failed!" | |
adduser $uservar | |
usermod -aG sudo $uservar | |
USER=$uservar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=RClone Service | |
After=network-online.target | |
Wants=network-online.target | |
[Service] | |
Type=notify | |
ExecStart=/usr/bin/rclone mount --allow-other --dir-cache-time 1000h --log-level INFO --log-file /home/plex/logs/rclone.log --bwlimit-file 16M Googlecrypt: /home/plex/mnt | |
ExecStop=/bin/fusermount -uz /home/plex/mnt | |
Restart=on-abort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# RCLONE UPLOAD CRON TAB SCRIPT | |
# Type crontab -e and add line below (without #) | |
# * * * * * /home/plex/scripts/rclone-upload.cron >/dev/null 2>&1 | |
# modify line 20 config file location | |
if pidof -o %PPID -x "rclone-upload.sh"; then | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 1. Change paths | |
# 2. for mount and log file & create mountchek file. | |
# 3. Add to crontab -e (paste the line bellow, without # in front) | |
# * * * * * /home/plex/scripts/rclone-mount-check.sh >/dev/null 2>&1 | |
# Make script executable with: chmod a+x /home/plex/scripts/rclone-mount-check.sh | |
LOGFILE="/home/plex/logs/rclone-mount-check.log" | |
RCLONEREMOTE="Googlecrypt:" | |
MPOINT="/home/plex/mnt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##SCRIPT TO BACKUP YOUR ENTIRE PLEXMEDIASERVER | |
##Needs root access | |
if [ "$(whoami &2>/dev/null)" != "root" ] && [ "$(id -un &2>/dev/null)" != "root" ] | |
then | |
echo "You must use root to run this script" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##Plexmediaserver restore | |
##Needs root access | |
if [ "$(whoami &2>/dev/null)" != "root" ] && [ "$(id -un &2>/dev/null)" != "root" ] | |
then | |
echo "You must use root to run this script" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Megerfs Service | |
Requires=rclonemount.service | |
After=rclonemount.service | |
RequiresMountsFor=/home/plex/mnt | |
[Service] | |
Type=forking | |
User=plex | |
Group=plex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#remove empty directories | |
find /home/plex/move/ -empty -type d -delete 2>/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=mergerfs mount | |
Requires=rclonemount.service | |
After=rclonemount.service | |
RequiresMountsFor=/home/plex/mnt | |
[Service] | |
Type=forking | |
ExecStart=/usr/bin/mergerfs /home/plex/move:/home/plex/mnt /home/plex/media -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full | |
KillMode=process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Sonarr Daemon | |
After=syslog.target network.target | |
[Service] | |
User=plex | |
Group=plex | |
Type=simple | |
ExecStart=/usr/bin/mono /opt/NzbDrone/NzbDrone.exe -nobrowser |
OlderNewer