change scripts dir

This commit is contained in:
wh1te909 2022-01-24 05:07:08 +00:00
parent 2d7db408fd
commit 1cb37d29df
4 changed files with 25 additions and 19 deletions

View File

@ -4,7 +4,7 @@ from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent
SCRIPTS_DIR = "/community-scripts"
SCRIPTS_DIR = "/opt/trmm-community-scripts"
DOCKER_BUILD = False

View File

@ -1,6 +1,6 @@
#!/bin/bash
SCRIPT_VERSION="57"
SCRIPT_VERSION="58"
SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/install.sh'
sudo apt install -y curl wget dirmngr gnupg lsb-release
@ -11,6 +11,8 @@ BLUE='\033[0;34m'
RED='\033[0;31m'
NC='\033[0m'
SCRIPTS_DIR="/opt/trmm-community-scripts"
TMP_FILE=$(mktemp -p "" "rmminstall_XXXXXXXXXX")
curl -s -L "${SCRIPT_URL}" > ${TMP_FILE}
NEW_VER=$(grep "^SCRIPT_VERSION" "$TMP_FILE" | awk -F'[="]' '{print $3}')
@ -243,10 +245,10 @@ git config user.email "admin@example.com"
git config user.name "Bob"
git checkout master
sudo mkdir /community-scripts
sudo chown ${USER}:${USER} /community-scripts
git clone https://github.com/amidaware/community-scripts.git /community-scripts/
cd /community-scripts
sudo mkdir -p ${SCRIPTS_DIR}
sudo chown ${USER}:${USER} ${SCRIPTS_DIR}
git clone https://github.com/amidaware/community-scripts.git ${SCRIPTS_DIR}/
cd ${SCRIPTS_DIR}
git config user.email "admin@example.com"
git config user.name "Bob"
git checkout main

View File

@ -1,6 +1,6 @@
#!/bin/bash
SCRIPT_VERSION="32"
SCRIPT_VERSION="33"
SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/restore.sh'
sudo apt update
@ -12,6 +12,8 @@ BLUE='\033[0;34m'
RED='\033[0;31m'
NC='\033[0m'
SCRIPTS_DIR="/opt/trmm-community-scripts"
TMP_FILE=$(mktemp -p "" "rmmrestore_XXXXXXXXXX")
curl -s -L "${SCRIPT_URL}" > ${TMP_FILE}
NEW_VER=$(grep "^SCRIPT_VERSION" "$TMP_FILE" | awk -F'[="]' '{print $3}')
@ -218,10 +220,10 @@ git config user.email "admin@example.com"
git config user.name "Bob"
git checkout master
sudo mkdir /community-scripts
sudo chown ${USER}:${USER} /community-scripts
git clone https://github.com/amidaware/community-scripts.git /community-scripts/
cd /community-scripts
sudo mkdir -p ${SCRIPTS_DIR}
sudo chown ${USER}:${USER} ${SCRIPTS_DIR}
git clone https://github.com/amidaware/community-scripts.git ${SCRIPTS_DIR}/
cd ${SCRIPTS_DIR}
git config user.email "admin@example.com"
git config user.name "Bob"
git checkout main

View File

@ -1,6 +1,6 @@
#!/bin/bash
SCRIPT_VERSION="128"
SCRIPT_VERSION="129"
SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/update.sh'
LATEST_SETTINGS_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/master/api/tacticalrmm/tacticalrmm/settings.py'
YELLOW='\033[1;33m'
@ -9,6 +9,8 @@ RED='\033[0;31m'
NC='\033[0m'
THIS_SCRIPT=$(readlink -f "$0")
SCRIPTS_DIR="/opt/trmm-community-scripts"
TMP_FILE=$(mktemp -p "" "rmmupdate_XXXXXXXXXX")
curl -s -L "${SCRIPT_URL}" > ${TMP_FILE}
NEW_VER=$(grep "^SCRIPT_VERSION" "$TMP_FILE" | awk -F'[="]' '{print $3}')
@ -237,15 +239,15 @@ git clean -df
git pull
# update from community-scripts repo
if [[ ! -d /community-scripts ]]; then
sudo mkdir /community-scripts
sudo chown ${USER}:${USER} /community-scripts
git clone https://github.com/amidaware/community-scripts.git /community-scripts/
cd /community-scripts
if [[ ! -d ${SCRIPTS_DIR} ]]; then
sudo mkdir -p ${SCRIPTS_DIR}
sudo chown ${USER}:${USER} ${SCRIPTS_DIR}
git clone https://github.com/amidaware/community-scripts.git ${SCRIPTS_DIR}/
cd ${SCRIPTS_DIR}
git config user.email "admin@example.com"
git config user.name "Bob"
else
cd /community-scripts
cd ${SCRIPTS_DIR}
git config user.email "admin@example.com"
git config user.name "Bob"
git fetch
@ -260,7 +262,7 @@ WHEEL_VER=$(grep "^WHEEL_VER" "$SETTINGS_FILE" | awk -F'[= "]' '{print $5}')
sudo chown ${USER}:${USER} -R /rmm
sudo chown ${USER}:${USER} -R /community-scripts
sudo chown ${USER}:${USER} -R ${SCRIPTS_DIR}
sudo chown ${USER}:${USER} /var/log/celery
sudo chown ${USER}:${USER} -R /etc/conf.d/
sudo chown -R $USER:$GROUP /home/${USER}/.npm