mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
Final Update spoolman-install.sh
This commit is contained in:
parent
c34c0afa82
commit
991ef1b734
1 changed files with 9 additions and 16 deletions
|
@ -16,42 +16,37 @@ network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y --no-install-recommends \
|
$STD apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
curl \
|
curl \
|
||||||
unzip \
|
|
||||||
sudo \
|
sudo \
|
||||||
jq \
|
|
||||||
git \
|
|
||||||
make \
|
make \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
gnupg \
|
unzip \
|
||||||
|
gpg \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
mc
|
mc
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Python3"
|
msg_info "Installing Python3"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
python3 \
|
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-setuptools \
|
python3-setuptools \
|
||||||
python3-wheel \
|
python3-wheel \
|
||||||
python3-pip \
|
python3-pip
|
||||||
python3-venv
|
|
||||||
msg_ok "Installed Python3"
|
msg_ok "Installed Python3"
|
||||||
|
|
||||||
msg_info "Installing Spoolman"
|
msg_info "Installing Spoolman"
|
||||||
cd /opt
|
cd /opt
|
||||||
RELEASE=$(wget -q https://github.com/Donkie/Spoolman/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
RELEASE=$(wget -q https://github.com/Donkie/Spoolman/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
||||||
|
cd /opt
|
||||||
wget -q https://github.com/Donkie/Spoolman/releases/download/$RELEASE/spoolman.zip
|
wget -q https://github.com/Donkie/Spoolman/releases/download/$RELEASE/spoolman.zip
|
||||||
unzip -q spoolman.zip -d spoolman
|
unzip -q spoolman.zip -d spoolman
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
rm -rf spoolman.zip
|
||||||
cd spoolman
|
cd spoolman
|
||||||
$STD python3 -m venv .venv
|
|
||||||
$STD source .venv/bin/activate
|
|
||||||
$STD pip3 install -r requirements.txt
|
$STD pip3 install -r requirements.txt
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
chmod +x scripts/*.sh
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
msg_ok "Installed Spoolman"
|
msg_ok "Installed Spoolman"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
@ -59,15 +54,13 @@ cat <<EOF >/etc/systemd/system/spoolman.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Spoolman
|
Description=Spoolman
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
WorkingDirectory=/opt/spoolman
|
WorkingDirectory=/opt/spoolman
|
||||||
EnvironmentFile=/opt/spoolman/.env
|
EnvironmentFile=/opt/spoolman/.env
|
||||||
ExecStart=/opt/spoolman/scripts/start.sh
|
ExecStart=uvicorn spoolman.main:app --host 0.0.0.0 --port 7912
|
||||||
Restart=always
|
Restart=always
|
||||||
User=root
|
User=root
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
@ -80,4 +73,4 @@ customize
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue