mirror of https://github.com/tteck/Proxmox.git
Update jellyfin_setup.sh
This commit is contained in:
parent
1d83f0f77e
commit
30a6b63078
|
@ -63,10 +63,46 @@ apt-get -y install \
|
||||||
/bin/chmod 660 /dev/dri/*
|
/bin/chmod 660 /dev/dri/*
|
||||||
|
|
||||||
echo -e "${CHECKMARK} \e[1;92m Installing Jellyfin... \e[0m"
|
echo -e "${CHECKMARK} \e[1;92m Installing Jellyfin... \e[0m"
|
||||||
sudo apt install -y extrepo
|
sudo mkdir /opt/jellyfin
|
||||||
sudo extrepo enable jellyfin
|
cd /opt/jellyfin
|
||||||
apt-get update &>/dev/null
|
sudo wget https://repo.jellyfin.org/releases/server/linux/stable/combined/jellyfin_10.7.7_amd64.tar.gz
|
||||||
apt-get install jellyfin -y &>/dev/null
|
sudo tar xvzf jellyfin_10.7.7_amd64.tar.gz
|
||||||
|
sudo ln -s jellyfin_10.7.7 jellyfin
|
||||||
|
sudo mkdir data cache config log
|
||||||
|
mkfile jellyfin.sh
|
||||||
|
cat >jellyfin.sh <<'EOF'
|
||||||
|
#!/bin/bash
|
||||||
|
JELLYFINDIR="/opt/jellyfin"
|
||||||
|
FFMPEGDIR="/usr/share/jellyfin-ffmpeg"
|
||||||
|
|
||||||
|
$JELLYFINDIR/jellyfin/jellyfin \
|
||||||
|
-d $JELLYFINDIR/data \
|
||||||
|
-C $JELLYFINDIR/cache \
|
||||||
|
-c $JELLYFINDIR/config \
|
||||||
|
-l $JELLYFINDIR/log \
|
||||||
|
--ffmpeg $FFMPEGDIR/ffmpeg
|
||||||
|
EOF
|
||||||
|
sudo chmod +x jellyfin.sh
|
||||||
|
|
||||||
|
echo -e "${CHECKMARK} \e[1;92m Installing FFmpeg... \e[0m"
|
||||||
|
sudo wget https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/4.4.1-1/jellyfin-ffmpeg_4.4.1-1-bullseye_amd64.deb &>/dev/null
|
||||||
|
sudo dpkg --install jellyfin-ffmpeg_4.4.1-1-bullseye_amd64.deb &>/dev/null
|
||||||
|
echo -e "${CHECKMARK} \e[1;92m Creating Service file jellyfin.service... \e[0m"
|
||||||
|
service_path="/etc/systemd/system/jellyfin.service"
|
||||||
|
echo "[Unit]
|
||||||
|
Description=Jellyfin
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
Restart=always
|
||||||
|
ExecStart=/opt/jellyfin/jellyfin.sh
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target > $service_path
|
||||||
|
sudo chmod 644 /etc/systemd/system/jellyfin.service
|
||||||
|
|
||||||
echo -e "${CHECKMARK} \e[1;92m Customizing Container... \e[0m"
|
echo -e "${CHECKMARK} \e[1;92m Customizing Container... \e[0m"
|
||||||
chmod -x /etc/update-motd.d/*
|
chmod -x /etc/update-motd.d/*
|
||||||
touch ~/.hushlogin
|
touch ~/.hushlogin
|
||||||
|
@ -79,8 +115,8 @@ ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,3840
|
||||||
EOF
|
EOF
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
||||||
#usermod -a -G input jellyfin
|
sudo systemctl enable jellyfin.service &>/dev/null
|
||||||
#usermod -a -G render jellyfin
|
sudo systemctl start jellyfin.service &>/dev/null
|
||||||
#systemctl enable jellyfin &>/dev/null
|
|
||||||
echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m"
|
echo -e "${CHECKMARK} \e[1;92m Cleanup... \e[0m"
|
||||||
rm -rf /jellyfin_setup.sh /var/{cache,log}/* /var/lib/apt/lists/*
|
rm -rf /jellyfin_setup.sh /var/{cache,log}/* /var/lib/apt/lists/*
|
||||||
|
|
Loading…
Reference in New Issue