add assets
This commit is contained in:
parent
ca5df24b6d
commit
d438f71bbb
|
@ -68,6 +68,7 @@ mkdir ${tmp_dir}/nginx
|
|||
mkdir ${tmp_dir}/systemd
|
||||
mkdir ${tmp_dir}/rmm
|
||||
mkdir ${tmp_dir}/confd
|
||||
mkdir ${tmp_dir}/opt
|
||||
|
||||
POSTGRES_USER=$(/rmm/api/env/bin/python /rmm/api/tacticalrmm/manage.py get_config dbuser)
|
||||
POSTGRES_PW=$(/rmm/api/env/bin/python /rmm/api/tacticalrmm/manage.py get_config dbpw)
|
||||
|
@ -93,6 +94,10 @@ if [ -d /etc/letsencrypt ]; then
|
|||
sudo tar -czvf ${tmp_dir}/certs/etc-letsencrypt.tar.gz -C /etc/letsencrypt .
|
||||
fi
|
||||
|
||||
if [ -d /opt/tactical ]; then
|
||||
sudo tar -czvf ${tmp_dir}/opt/opt-tactical.tar.gz -C /opt/tactical .
|
||||
fi
|
||||
|
||||
local_settings='/rmm/api/tacticalrmm/tacticalrmm/local_settings.py'
|
||||
|
||||
if grep -q CERT_FILE "$local_settings"; then
|
||||
|
|
11
restore.sh
11
restore.sh
|
@ -220,6 +220,17 @@ elif [ -d "${tmp_dir}/certs/selfsigned" ]; then
|
|||
cp -p ${tmp_dir}/certs/selfsigned/cert.pem $certdir
|
||||
fi
|
||||
|
||||
print_green 'Restoring assets'
|
||||
if [ -f "$tmp_dir/opt/opt-tactical.tar.gz" ]; then
|
||||
sudo mkdir -p /opt/tactical
|
||||
sudo tar -xzf $tmp_dir/opt/opt-tactical.tar.gz -C /opt/tactical
|
||||
sudo chown ${USER}:${USER} -R /opt/tactical
|
||||
else
|
||||
sudo mkdir -p /opt/tactical/reporting/assets
|
||||
sudo mkdir -p /opt/tactical/reporting/schemas
|
||||
sudo chown -R ${USER}:${USER} /opt/tactical
|
||||
fi
|
||||
|
||||
print_green 'Restoring celery configs'
|
||||
|
||||
sudo mkdir /etc/conf.d
|
||||
|
|
Loading…
Reference in New Issue