5h4d0w.net

The Cat's den

Mount CIFS shares with systemd

- Posted in SysAdmin Stuff by

Create the mount point

mkdir /mnt/share

Create the systemd definition file

nano /etc/systemd/system/mnt-share.mount

Note : The filename must contain the mountpoint name where the slashes are replaced with dashes.

[Unit]
Description=CIFS mount service
Requires=network-online.target
After=network-online.service

[Mount]
What=//server/myshare
Where=/mnt/share
Options=guest,uid=root,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm
Type=cifs

[Install]
WantedBy=multi-user.target

Enable the mounting service

Start the service

systemctl start mnt-share.mount

Check for errors

systemctl status mnt-share.mount

If no error occured, you can now enable the service at boot

systemctl enable mnt-share.mount

(Optional) Delay the mounting service

If mount at boot doesn't work, systemd is probably trying to mount shares too fast after initialising the network.

nano /etc/systemd/system/network-online.target.wants/networking.service
[Service]
Type=oneshot
EnvironmentFile=-/etc/default/networking
ExecStart=/sbin/ifup -a --read-environment
ExecStartPost=/bin/sleep 10
ExecStop=/sbin/ifdown -a --read-environment --exclude=lo
RemainAfterExit=true
TimeoutStartSec=5min

ExecStartPost=/bin/sleep 10 makes networking.service wait for 10 seconds after execution before doing anything else.
Ugly, but it works ¯\_(ツ)_/¯

Source : michlstechblog.info

Install radarr on Debian 10

- Posted in SysAdmin Stuff by

radarr logo

What is radarr ?

Radarr is an independent fork of Sonarr reworked for automatic download of movies via Usenet and BitTorrent.
The full capabilities of radarr can be found on GitHub.

How to install radarr on Debian 10 ?

Add the Mono repository to the system

Install the pre-requisite software

apt install apt-transport-https dirmngr gnupg ca-certificates curl mediainfo

Grab the Mono repo keys from the keyserver

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

Add the repo to your system

echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list

Refresh the sources

apt update

Install Mono

apt install mono-devel

Install radarr

Create a new user

useradd STUFF STUFF

Change working directory to /tmp/

cd /tmp/

Download latest radarr release from GitHub

wget https://github.com/Radarr/Radarr/releases/download/v0.2.0.1450/Radarr.develop.0.2.0.1450.linux.tar.gz

Extract the downloaded archive to /opt/

tar -xf Radarr* -C /opt/

Grant ownership of the radarr installation to the previously created user

chown -R radarr:radarr /opt/Radarr

Start radarr at boot

Create a systemd service file for the radarr daemon with nano /etc/systemd/system/radarr.service containing :

[Unit]
Description=Radarr Daemon
After=syslog.target network.target

[Service]
User=radarr
Group=radarr
Type=simple
ExecStart=/usr/bin/mono /opt/Radarr/Radarr.exe -nobrowser
TimeoutStopSec=20
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target

Enable radarr at boot

systemctl enable radarr.service

Launch the radarr service

systemctl start radarr.service

Access radarr

You should now be able to use your fresh radarr installation by pointing a browser to http://server.ip:7878 !

Jellyfin banner Ombi banner

What are Jellyfin and Ombi ?

Jellyfin

Jellyfin is a free program that lets you collect, control, and stream all your favourite media. It's the open-source fork of Emby. Official Jellyfin website

Ombi

Ombi is a self-hosted web application that automatically gives your shared Plex or Emby users the ability to request content by themselves! Ombi can be linked to multiple TV Show and Movie DVR tools to create a seamless end-to-end experience. Official Ombi website

How to install Jellyfin and Ombi on Debian 9 ?

Acquire root privileges

su -

Update server

apt update && apt dist-upgrade -y

Install pre-requisites

apt install apt-transport-https gnupg -y

Add Jellyfin & Ombi repos signatures

wget -qO - https://repo.jellyfin.org/jellyfin_team.gpg.key | apt-key add -
wget -qO - https://repo.ombi.turd.me/pubkey.txt | apt-key add -

Add Jellyfin & Ombi repos

echo "deb [arch=amd64] https://repo.jellyfin.org/debian stretch main" | tee /etc/apt/sources.list.d/jellyfin.list
echo "deb [arch=amd64] http://repo.ombi.turd.me/stable/ jessie main" | tee "/etc/apt/sources.list.d/ombi.list"

Update and install packages

apt update && apt install jellyfin ombi -y

Start services at boot

systemctl enable jellyfin
systemctl enable ombi

Access the services

  • Jellyfin : http://server.ip:8096
  • Ombi : http://server.ip:5000