-
-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add audiobookshelf install sh #1028
Conversation
Thanks for the contribution lupu60. I have a few items of feedback:
|
Hello @liaralabs.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly what Liara said, let me know if there's anything I can help you with!
__add_to_pannel(){ | ||
curl -o /opt/swizzin/static/img/apps/audiobookshelf.png https://www.audiobookshelf.org/Logo.png | ||
# Content to write | ||
content='from core.profiles import *\n\n | ||
class audiobookshelf_meta:\n | ||
name = "audiobookshelf"\n | ||
pretty_name = "Audiobookshelf"\n | ||
baseurl = "/audiobookshelf"\n | ||
systemd = "audiobookshelf"\n | ||
check_theD = True' | ||
|
||
# Write content to the file | ||
echo -e "$content" > /opt/swizzin/core/custom/profiles.py | ||
|
||
echo "Content has been written to /opt/swizzin/core/custom/profiles.py" | ||
touch /install/.audiobookshelf.lock | ||
systemctl restart panel | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove this and make a PR on the panel repo please? Let me know if you need help in the discord
# Audiobookshelf installer | ||
|
||
_install_audiobookshelf() { | ||
echo_progress_start "Installing audiobookshelf apt sources" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo_progress_start
kind of expects an echo_progress_done
, think of the two as the slices of bread in a waiting sandwich
|
||
_install_audiobookshelf() { | ||
echo_progress_start "Installing audiobookshelf apt sources" | ||
apt install gnupg curl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have apt_install
defined which helps handle these without the interactivity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use it like this, it is imported into the environment anytime you run box
, you can check sources/globals.sh
to see what else there is
apt install gnupg curl | |
apt_install gnupg curl |
curl -s https://advplyr.github.io/audiobookshelf-ppa/KEY.gpg | apt-key add - | ||
curl -s -o /etc/apt/sources.list.d/audiobookshelf.list https://advplyr.github.io/audiobookshelf-ppa/audiobookshelf.list | ||
apt update | ||
apt install audiobookshelf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, would be nice to keep the apt installs to one call with one big list in my opinion
__remove_from_pannel() { | ||
content= 'from core.profiles import *\n\n' | ||
echo -e "$content" > /opt/swizzin/core/custom/profiles.py | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, not really needed if it's in the panel repo
apt update | ||
apt autoremove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've got apt functions for these two, but I don't think you need to do the update here, just takes time. The apt tools will auto-update themselves as they're being called if necessary
systemctl stop audiobookshelf.service | ||
sysctl disable audiobookshelf.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disable
also takes --now
parameter so you can get these done in one line. Would also be nice to pass the -q
flag so it's quiet
Add installation for audiobookshelf
Description
Add installation for audiobookshelf
Change Categories
Checklist
develop
branch and the PR is targetting thedevelop
branchTest scenarios
Architectures
amd64
armhf
arm64
✅❎ Passed
🛠🛠 TODO
❌❌ Currently failing