From f17861a74873d1d12a8c1dbc756d5f5a75edd84b Mon Sep 17 00:00:00 2001 From: Sam Heinz <54530346+asylumexp@users.noreply.github.com> Date: Fri, 7 Jun 2024 22:45:11 +1000 Subject: [PATCH] add server service, create config/metadata dirs [audiobookshelf] --- install/audiobookshelf-install.sh | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/install/audiobookshelf-install.sh b/install/audiobookshelf-install.sh index 42511ba89..2211f987e 100644 --- a/install/audiobookshelf-install.sh +++ b/install/audiobookshelf-install.sh @@ -40,12 +40,14 @@ $STD npm ci cd client $STD npm ci $STD npm run generate +mkdir -p /usr/share/audiobookshelf/config +mkdir -p /usr/share/audiobookshelf/metadata msg_ok "Installed audiobookshelf" msg_info "Creating Service" -cat </etc/systemd/system/audiobookshelf.service +cat </etc/systemd/system/audiobookshelf_client.service [Unit] -Description=Audiobookshelf Service +Description=Audiobookshelf Client Service After=network.target [Service] @@ -57,7 +59,22 @@ Restart=on-failure [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now audiobookshelf.service +cat </etc/systemd/system/audiobookshelf_server.service +[Unit] +Description=Audiobookshelf Server Service +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/audiobookshelf/ +ExecStart=/usr/bin/npm run dev +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now audiobookshelf_server.service +systemctl enable -q --now audiobookshelf_client.service msg_ok "Created Service" motd_ssh