forked from forkanization/Proxmox-arm64
Manually build audiobookshelf
This commit is contained in:
@@ -18,15 +18,47 @@ $STD apt-get install -y curl
|
|||||||
$STD apt-get install -y sudo
|
$STD apt-get install -y sudo
|
||||||
$STD apt-get install -y gnupg
|
$STD apt-get install -y gnupg
|
||||||
$STD apt-get install -y mc
|
$STD apt-get install -y mc
|
||||||
|
$STD apt-get install -y wget
|
||||||
|
$STD apt-get install ffmpeg
|
||||||
|
$STD apt-get install git
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing audiobookshelf"
|
msg_info "Installing Node.js"
|
||||||
curl -fsSL https://advplyr.github.io/audiobookshelf-ppa/KEY.gpg >/etc/apt/trusted.gpg.d/audiobookshelf-ppa.asc
|
|
||||||
echo "deb [signed-by=/etc/apt/trusted.gpg.d/audiobookshelf-ppa.asc] https://advplyr.github.io/audiobookshelf-ppa ./" >/etc/apt/sources.list.d/audiobookshelf.list
|
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
$STD apt install audiobookshelf
|
$STD apt-get install -y nodejs
|
||||||
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
|
msg_info "Installing audiobookshelf"
|
||||||
|
$STD git clone https://github.com/advplyr/audiobookshelf /opt/audiobookshelf
|
||||||
|
cd /opt/audiobookshelf
|
||||||
|
sed -i 's/Port: 3333/Port: 13378/' ./.devcontainer/dev.js
|
||||||
|
sed -i "s|ConfigPath: Path.resolve('config'),|ConfigPath: '/usr/share/audiobookshelf/config',|" ./.devcontainer/dev.js
|
||||||
|
sed -i "s|MetadataPath: Path.resolve('metadata'),|MetadataPath: '/usr/share/audiobookshelf/metadata',|" ./.devcontainer/dev.js
|
||||||
|
mv ./.devcontainer/dev.js ./dev.js
|
||||||
|
$STD npm ci
|
||||||
|
cd client
|
||||||
|
$STD npm ci
|
||||||
|
$STD npm run generate
|
||||||
msg_ok "Installed audiobookshelf"
|
msg_ok "Installed audiobookshelf"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/audiobookshelf.service
|
||||||
|
[Unit]
|
||||||
|
Description=Audiobookshelf Service
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/opt/audiobookshelf/client
|
||||||
|
ExecStart=/usr/bin/npm run dev
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now audiobookshelf.service
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user