This file contains hidden or 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 | |
| # ============================================================================== | |
| # Plex Media Server Healthcheck & Auto-Recovery Script | |
| # ============================================================================== | |
| # | |
| # Author: MorphyDK | |
| # GitHub: https://github.com/MorphyDK | |
| # Repository: Plex-Healthcheck-AutoRecovery | |
| # License: MIT | |
| # |
This file contains hidden or 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 | |
| ### CONFIG ### | |
| # Change your LAN CARD according to your own system, in my case its ens18. | |
| # Build for Ubuntu Desktop and testet for Ubuntu 24.04 | |
| # WEB_IP = Add your ip of the client that need to use the this server as gateway. | |
| # Script is acting as gateway where ports are being transfered directly on to the client via TorGuard. | |
| # Script includes a kill switch. If VPN dies - the gateway is lost to the client. No internet. | |
| set -e | |
| LAN_IF="ens18" |
This file contains hidden or 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 | |
| # Config | |
| INTERFACE="wg0" | |
| SERVICE="wg-quick@${INTERFACE}.service" | |
| CHECK_INTERVAL=30 | |
| MAX_RETRIES=5 | |
| RETRY_DELAY=10 | |
| check_vpn() { |
This file contains hidden or 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/sh | |
| #Check the Drive Space Used by Cached Files | |
| du -sh /var/cache/apt/archives | |
| #Clean all the log file | |
| #for logs in `find /var/log -type f`; do > $logs; done | |
| logs=`find /var/log -type f` | |
| for i in $logs |
This file contains hidden or 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 |
This file contains hidden or 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 hidden or 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 hidden or 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 |