mirror of https://github.com/tteck/Proxmox
parent
87251a4987
commit
b1c25b5341
1 changed files with 66 additions and 70 deletions
@ -1,70 +1,66 @@ |
|||||||
#!/usr/bin/env bash |
#!/usr/bin/env bash |
||||||
|
|
||||||
# Copyright (c) 2021-2023 tteck |
# Copyright (c) 2021-2023 tteck |
||||||
# Author: tteck (tteckster) |
# Author: tteck (tteckster) |
||||||
# License: MIT |
# License: MIT |
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE |
# https://github.com/tteck/Proxmox/raw/main/LICENSE |
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" |
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" |
||||||
color |
color |
||||||
verb_ip6 |
verb_ip6 |
||||||
catch_errors |
catch_errors |
||||||
setting_up_container |
setting_up_container |
||||||
network_check |
network_check |
||||||
update_os |
update_os |
||||||
|
|
||||||
msg_info "Installing Dependencies" |
msg_info "Installing Dependencies" |
||||||
$STD apt-get install -y curl |
$STD apt-get install -y curl |
||||||
$STD apt-get install -y sudo |
$STD apt-get install -y sudo |
||||||
$STD apt-get install -y unzip |
$STD apt-get install -y unzip |
||||||
$STD apt-get install -y python3-pip |
$STD apt-get install -y python3-pip |
||||||
$STD apt-get install -y python3-distutils |
$STD apt-get install -y python3-distutils |
||||||
msg_ok "Installed Dependencies" |
msg_ok "Installed Dependencies" |
||||||
|
|
||||||
msg_info "Installing Bazarr" |
msg_info "Installing Bazarr" |
||||||
mkdir -p /var/lib/bazarr/ |
mkdir -p /var/lib/bazarr/ |
||||||
chmod 775 /var/lib/bazarr/ |
chmod 775 /var/lib/bazarr/ |
||||||
$STD wget --content-disposition 'https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip' |
$STD wget --content-disposition 'https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip' |
||||||
$STD unzip bazarr -d Bazarr |
$STD unzip bazarr -d Bazarr |
||||||
mv Bazarr /opt |
mv Bazarr /opt |
||||||
chmod 775 /opt/Bazarr |
chmod 775 /opt/Bazarr |
||||||
$STD python3 -m pip install -r requirements.txt |
$STD python3 -m pip install -r requirements.txt |
||||||
msg_ok "Installed Bazarr" |
msg_ok "Installed Bazarr" |
||||||
|
|
||||||
msg_info "Creating Service" |
msg_info "Creating Service" |
||||||
cat <<EOF >/etc/systemd/system/bazarr.service |
cat <<EOF >/etc/systemd/system/bazarr.service |
||||||
[Unit] |
[Unit] |
||||||
Description=Bazarr Daemon |
Description=Bazarr Daemon |
||||||
After=syslog.target network.target |
After=syslog.target network.target |
||||||
|
|
||||||
# After=syslog.target network.target sonarr.service radarr.service |
[Service] |
||||||
|
WorkingDirectory=/opt/bazarr/ |
||||||
[Service] |
UMask=0002 |
||||||
WorkingDirectory=/opt/bazarr/ |
Restart=on-failure |
||||||
User=your_user(username of your choice) |
RestartSec=5 |
||||||
Group=your_group(group of your choice) |
Type=simple |
||||||
UMask=0002 |
ExecStart=/usr/bin/python3 /opt/bazarr/bazarr.py |
||||||
Restart=on-failure |
KillSignal=SIGINT |
||||||
RestartSec=5 |
TimeoutStopSec=20 |
||||||
Type=simple |
SyslogIdentifier=bazarr |
||||||
ExecStart=/usr/bin/python3 /opt/bazarr/bazarr.py |
ExecStartPre=/bin/sleep 30 |
||||||
KillSignal=SIGINT |
|
||||||
TimeoutStopSec=20 |
[Install] |
||||||
SyslogIdentifier=bazarr |
WantedBy=multi-user.target |
||||||
ExecStartPre=/bin/sleep 30 |
EOF |
||||||
|
systemctl -q daemon-reload |
||||||
[Install] |
systemctl enable --now -q bazarr |
||||||
WantedBy=multi-user.target |
msg_ok "Created Service" |
||||||
EOF |
|
||||||
systemctl -q daemon-reload |
motd_ssh |
||||||
systemctl enable --now -q bazarr |
root |
||||||
msg_ok "Created Service" |
|
||||||
|
msg_info "Cleaning up" |
||||||
motd_ssh |
rm -rf Bazarr.zip |
||||||
root |
$STD apt-get autoremove |
||||||
|
$STD apt-get autoclean |
||||||
msg_info "Cleaning up" |
msg_ok "Cleaned" |
||||||
rm -rf Bazarr.master.*.tar.gz |
|
||||||
$STD apt-get autoremove |
|
||||||
$STD apt-get autoclean |
|
||||||
msg_ok "Cleaned" |
|
||||||
|
Loading…
Reference in new issue