mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-26 22:29:45 +00:00
Deliberately remove a previous venv for the python clients
This commit is contained in:
parent
0589a0efad
commit
cad3df690e
|
@ -111,7 +111,15 @@ function sudoCheck() {
|
||||||
function deleteFile() {
|
function deleteFile() {
|
||||||
if sudo test -f "$1/$2"; then
|
if sudo test -f "$1/$2"; then
|
||||||
sudo rm "$1/$2" || exit 1
|
sudo rm "$1/$2" || exit 1
|
||||||
echo "Deleted $1/$2"
|
echo "Deleted file $1/$2"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Delete dir if it exists
|
||||||
|
function deleteDir() {
|
||||||
|
if sudo test -d "$1"; then
|
||||||
|
sudo rm -rf "$1" || exit 1
|
||||||
|
echo "Deleted directory $1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,6 +237,9 @@ function installPiscsiWebInterface() {
|
||||||
deleteFile "$SSL_CERTS_PATH" "rascsi-web.crt"
|
deleteFile "$SSL_CERTS_PATH" "rascsi-web.crt"
|
||||||
deleteFile "$SSL_KEYS_PATH" "rascsi-web.key"
|
deleteFile "$SSL_KEYS_PATH" "rascsi-web.key"
|
||||||
|
|
||||||
|
# Deleting previous venv dir, if one exists, to avoid the common issue of broken python dependencies
|
||||||
|
deleteDir "$WEB_INSTALL_PATH/venv"
|
||||||
|
|
||||||
if [ -f "$SSL_CERTS_PATH/piscsi-web.crt" ]; then
|
if [ -f "$SSL_CERTS_PATH/piscsi-web.crt" ]; then
|
||||||
echo "SSL certificate $SSL_CERTS_PATH/piscsi-web.crt already exists."
|
echo "SSL certificate $SSL_CERTS_PATH/piscsi-web.crt already exists."
|
||||||
else
|
else
|
||||||
|
@ -1025,6 +1036,9 @@ function installPiscsiScreen() {
|
||||||
REBOOT=1
|
REBOOT=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Deleting previous venv dir, if one exists, to avoid the common issue of broken python dependencies
|
||||||
|
deleteDir "$OLED_INSTALL_PATH/venv"
|
||||||
|
|
||||||
echo "Installing the piscsi-oled.service configuration..."
|
echo "Installing the piscsi-oled.service configuration..."
|
||||||
sudo cp -f "$OLED_INSTALL_PATH/service-infra/piscsi-oled.service" "$SYSTEMD_PATH/piscsi-oled.service"
|
sudo cp -f "$OLED_INSTALL_PATH/service-infra/piscsi-oled.service" "$SYSTEMD_PATH/piscsi-oled.service"
|
||||||
sudo sed -i /^ExecStart=/d "$SYSTEMD_PATH/piscsi-oled.service"
|
sudo sed -i /^ExecStart=/d "$SYSTEMD_PATH/piscsi-oled.service"
|
||||||
|
@ -1129,6 +1143,9 @@ function installPiscsiCtrlBoard() {
|
||||||
fi
|
fi
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Deleting previous venv dir, if one exists, to avoid the common issue of broken python dependencies
|
||||||
|
deleteDir "$CTRLBOARD_INSTALL_PATH/venv"
|
||||||
|
|
||||||
echo "Installing the piscsi-ctrlboard.service configuration..."
|
echo "Installing the piscsi-ctrlboard.service configuration..."
|
||||||
sudo cp -f "$CTRLBOARD_INSTALL_PATH/service-infra/piscsi-ctrlboard.service" "$SYSTEMD_PATH/piscsi-ctrlboard.service"
|
sudo cp -f "$CTRLBOARD_INSTALL_PATH/service-infra/piscsi-ctrlboard.service" "$SYSTEMD_PATH/piscsi-ctrlboard.service"
|
||||||
sudo sed -i /^ExecStart=/d "$SYSTEMD_PATH/piscsi-ctrlboard.service"
|
sudo sed -i /^ExecStart=/d "$SYSTEMD_PATH/piscsi-ctrlboard.service"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user