Finish installer
This commit is contained in:
@@ -28,3 +28,4 @@ Then start the service:
|
|||||||
sudo systemctl enable open-webui.service
|
sudo systemctl enable open-webui.service
|
||||||
sudo systemctl start open-webui.service
|
sudo systemctl start open-webui.service
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -14,4 +14,4 @@ GROUP="open-webui"
|
|||||||
TARGET_DIR="/opt/open-webui"
|
TARGET_DIR="/opt/open-webui"
|
||||||
|
|
||||||
# The python version to use
|
# The python version to use
|
||||||
PYTHON=python3.13
|
PYTHON=python3.12
|
||||||
|
|||||||
25
installer.sh
Normal file → Executable file
25
installer.sh
Normal file → Executable file
@@ -4,6 +4,8 @@
|
|||||||
# Load the configuration
|
# Load the configuration
|
||||||
source ./installer.conf
|
source ./installer.conf
|
||||||
|
|
||||||
|
CURRENT_DIR=$(pwd)
|
||||||
|
|
||||||
# Create the users
|
# Create the users
|
||||||
echo "Create users and groups"
|
echo "Create users and groups"
|
||||||
getent group $GROUP > /dev/null 2&>1 || groupadd $GROUP
|
getent group $GROUP > /dev/null 2&>1 || groupadd $GROUP
|
||||||
@@ -16,7 +18,7 @@ fi
|
|||||||
echo "Writing configuration files..."
|
echo "Writing configuration files..."
|
||||||
mkdir -p /etc/open-webui
|
mkdir -p /etc/open-webui
|
||||||
cp open-webui.conf /etc/open-webui
|
cp open-webui.conf /etc/open-webui
|
||||||
sed -i 's/#TARGET_DIR#/${TARGET_DIR}/g' /etc/open-webui/open-webui.conf
|
sed -i "s|#TARGET_DIR#|${TARGET_DIR}|g" /etc/open-webui/open-webui.conf
|
||||||
|
|
||||||
# Now create the target directory
|
# Now create the target directory
|
||||||
echo "Creating target directory..."
|
echo "Creating target directory..."
|
||||||
@@ -24,23 +26,26 @@ mkdir -p $TARGET_DIR
|
|||||||
|
|
||||||
# And populate it
|
# And populate it
|
||||||
echo "Installing open-webui"
|
echo "Installing open-webui"
|
||||||
chown $USER:$GROUP $TARGET_DIR
|
|
||||||
cd $TARGET_DIR
|
cd $TARGET_DIR
|
||||||
sudo $PYTHON -m venv .venv
|
$PYTHON -m venv .venv
|
||||||
sudo -u $USER pip install --upgrade pip
|
source .venv/bin/activate
|
||||||
sudo -u $USER pip open-webui
|
pip install --upgrade pip
|
||||||
|
pip install open-webui
|
||||||
|
deactivate
|
||||||
|
chown -R $USER:$GROUP $TARGET_DIR
|
||||||
|
cd $CURRENT_DIR
|
||||||
echo "Finished installing open-webui."
|
echo "Finished installing open-webui."
|
||||||
|
|
||||||
# Now install the script file
|
# Now install the script file
|
||||||
echo "Installing the script"
|
echo "Installing the script"
|
||||||
mkdir -p /usr/local/bin
|
mkdir -p /usr/local/bin
|
||||||
cp ./run-open-webui /usr/local/bin
|
cp ./run-open-webui $TARGET_DIR
|
||||||
chmod +x /usr/local/bin/run-open-webui
|
chmod +x $TARGET_DIR/run-open-webui
|
||||||
|
|
||||||
# Install the systemd file
|
# Install the systemd file
|
||||||
echo "Installing the service file"
|
echo "Installing the service file"
|
||||||
cp ./open-webui.service /etc/systemd/system
|
cp ./open-webui.service /etc/systemd/system
|
||||||
sed -i '/#TARGET_DIR#/${TARGET_DIR}/g' /etc/systemd/system/open-webui.service
|
sed -i "s|#TARGET_DIR#|${TARGET_DIR}|g" /etc/systemd/system/open-webui.service
|
||||||
sed -i '/#USER#/${USER}/g' /etc/systemd/system/open-webui.service
|
sed -i "s|#USER#|${USER}|g" /etc/systemd/system/open-webui.service
|
||||||
sed -i '/#GROUP#/${GROUP}/g' /etc/systemd/system/open-webui.service
|
sed -i "s|#GROUP#|${GROUP}|g" /etc/systemd/system/open-webui.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|||||||
Reference in New Issue
Block a user