Skip to content

Instantly share code, notes, and snippets.

@MorphyDK
MorphyDK / rclonemount.service
Created August 2, 2023 14:12
Rclonemount for Dropbox
[Unit]
Description=RClone Service
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
Environment=RCLONE_CONFIG=/YOUR_PATH/rclone/rclone.conf
RestartSec=5
ExecStart=/usr/bin/rclone mount dcrypt: /YOUR/MOUNT/POINT/FOLDER \
@MorphyDK
MorphyDK / clean.sh
Last active August 17, 2022 12:23
Clean for logs and old kernels
#!/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
@MorphyDK
MorphyDK / rclonemount.service
Created May 22, 2021 18:51
Rclonemount with vfs-cache-mode full active
[Unit]
Description=RClone Service
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
Environment=RCLONE_CONFIG=/home/plex/.config/rclone/rclone.conf
ExecStart=/usr/bin/rclone mount Googlecrypt: /home/plex/mnt \
--allow-other \
@MorphyDK
MorphyDK / rclone-upload.sh
Last active June 16, 2021 14:20
mergerfs version with exclude-file.txt
#!/bin/bash
EXCLUDE=/home/plex/scripts/exclude-file.txt
LOGFILE=/home/plex/logs/rclone-upload.log
FROM=/home/plex/move
TO=Googlecrypt:/
if pidof -o %PPID -x "rclone-upload.sh"; then
exit 1
fi
# CHECK FOR FILES IN FROM FOLDER THAT ARE OLDER THAN 15 MINUTES
@MorphyDK
MorphyDK / torguard.service
Created September 24, 2020 14:27
TorGuard systemd service
[Unit]
Description=OpenVPN Robust And Highly Flexible Tunneling Application On <server>
Wants=network-online.target
After=network-online.target
[Service]
Type=forking
PIDFile=/run/openvpn-server.pid
ExecStart=/usr/sbin/openvpn --daemon --writepid /run/openvpn-server.pid --cd /etc/openvpn/ --auth-nocache --config TorGuard.Sweden.conf --log-append /var/log/openvpn.log
Restart=on-failure
@MorphyDK
MorphyDK / wifi-to-eth-route.sh
Last active October 19, 2020 09:45
Share Wifi with Eth devices ( OpenVPN )
#!/bin/bash
# Share Wifi with Eth device
# Original source:
# https://raw.githubusercontent.com/arpitjindal97/raspbian-recipes/master/wifi-to-eth-route.sh
#
# This script is created to work with Raspbian Stretch
# but it can be used with most of the distributions
# by making few changes.
#
@MorphyDK
MorphyDK / wifi-to-eth-route.sh
Created September 24, 2020 13:08
Share Wifi with Eth devices ( Wireguard )
#!/bin/bash
# Share Wifi with Eth device
# Original source:
# https://raw.githubusercontent.com/arpitjindal97/raspbian-recipes/master/wifi-to-eth-route.sh
# This script is created to work with Raspbian Stretch
# but it can be used with most of the distributions
# by making few changes.
#
# Make sure you have already installed `dnsmasq`
@MorphyDK
MorphyDK / sonarr.service
Created July 3, 2020 14:56
Sonarr service
[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
@MorphyDK
MorphyDK / mergerfs.service
Last active September 19, 2020 15:53
Mergerfs.service for Ubuntu Desktop 20.04
[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
@MorphyDK
MorphyDK / slet.sh
Created June 1, 2019 12:32
Slet move mappe
#!/bin/bash
#remove empty directories
find /home/plex/move/ -empty -type d -delete 2>/dev/null