2019-12-15 05:37:47 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-12-16 22:45:18 +00:00
|
|
|
for i in celery celery-winupdate celerybeat rmm nginx
|
|
|
|
do
|
|
|
|
sudo systemctl stop ${i}
|
|
|
|
done
|
|
|
|
|
2019-12-15 05:37:47 +00:00
|
|
|
cd /home/${USER}/rmm/
|
2020-01-15 20:59:45 +00:00
|
|
|
git fetch origin develop
|
|
|
|
git reset --hard FETCH_HEAD
|
|
|
|
git clean -df
|
2020-03-01 00:44:27 +00:00
|
|
|
cp /home/${USER}/rmm/_modules/* /srv/salt/_modules/
|
2020-03-28 10:11:21 +00:00
|
|
|
cp /home/${USER}/rmm/scripts/* /srv/salt/scripts/
|
2020-05-11 20:32:37 +00:00
|
|
|
rm -rf /home/${USER}/rmm/api/env
|
2020-05-11 21:06:18 +00:00
|
|
|
cd /home/${USER}/rmm/api
|
2020-05-11 20:32:37 +00:00
|
|
|
python3.7 -m venv env
|
2019-12-15 05:37:47 +00:00
|
|
|
source /home/${USER}/rmm/api/env/bin/activate
|
|
|
|
cd /home/${USER}/rmm/api/tacticalrmm
|
2020-05-11 20:32:37 +00:00
|
|
|
pip install --no-cache-dir --upgrade pip
|
|
|
|
pip install --no-cache-dir --upgrade setuptools wheel
|
|
|
|
pip install --no-cache-dir -r requirements.txt
|
2019-12-15 05:37:47 +00:00
|
|
|
python manage.py makemigrations
|
|
|
|
python manage.py migrate
|
2020-02-02 09:30:50 +00:00
|
|
|
python manage.py delete_tokens
|
2019-12-15 05:37:47 +00:00
|
|
|
deactivate
|
|
|
|
|
|
|
|
|
|
|
|
rm -rf /home/${USER}/rmm/web/node_modules
|
|
|
|
rm -rf /home/${USER}/rmm/web/dist
|
|
|
|
cd /home/${USER}/rmm/web
|
|
|
|
npm install
|
|
|
|
npm run build
|
|
|
|
sudo rm -rf /var/www/rmm/dist
|
|
|
|
sudo cp -pvr /home/${USER}/rmm/web/dist /var/www/rmm/
|
|
|
|
sudo chown www-data:www-data -R /var/www/rmm/dist
|
|
|
|
|
2019-12-16 22:45:18 +00:00
|
|
|
for i in celery celery-winupdate celerybeat rmm nginx
|
|
|
|
do
|
|
|
|
sudo systemctl start ${i}
|
|
|
|
done
|