fix regular copy instead of tar
Use setup_node Remove installing dependencies not needed
This commit is contained in:
parent
590049938c
commit
2b7d992632
@ -35,7 +35,11 @@ function update_script() {
|
|||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
msg_info "Creating Backup"
|
msg_info "Creating Backup"
|
||||||
tar -czf "/opt/discopanel_backup_last.tar.gz" -C "/opt/discopanel/data" discopanel.db .recovery_key servers
|
mkdir -p /opt/discopanel_backup_last
|
||||||
|
cp -r /opt/discopanel/data/discopanel.db \
|
||||||
|
/opt/discopanel/data/.recovery_key \
|
||||||
|
/opt/discopanel/data/servers \
|
||||||
|
/opt/discopanel_backup_last/
|
||||||
msg_ok "Created Backup"
|
msg_ok "Created Backup"
|
||||||
|
|
||||||
rm -rf /opt/discopanel
|
rm -rf /opt/discopanel
|
||||||
@ -53,7 +57,7 @@ function update_script() {
|
|||||||
msg_ok "Builded backend"
|
msg_ok "Builded backend"
|
||||||
|
|
||||||
msg_info "Restoring Data"
|
msg_info "Restoring Data"
|
||||||
tar -xzf "/opt/discopanel_backup_last.tar.gz" -C "/opt/discopanel/data"
|
cp -r /opt/discopanel_backup_last/* /opt/discopanel/data/
|
||||||
msg_ok "Restored Data"
|
msg_ok "Restored Data"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
|
|||||||
@ -14,11 +14,6 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apt install -y \
|
|
||||||
npm
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing Docker"
|
msg_info "Installing Docker"
|
||||||
DOCKER_CONFIG_PATH='/etc/docker/daemon.json'
|
DOCKER_CONFIG_PATH='/etc/docker/daemon.json'
|
||||||
mkdir -p $(dirname $DOCKER_CONFIG_PATH)
|
mkdir -p $(dirname $DOCKER_CONFIG_PATH)
|
||||||
@ -31,6 +26,8 @@ msg_info "Installing DiscoPanel"
|
|||||||
fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel"
|
fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel"
|
||||||
msg_ok "Installed DiscoPanel"
|
msg_ok "Installed DiscoPanel"
|
||||||
|
|
||||||
|
setup_nodejs
|
||||||
|
|
||||||
msg_info "Building DiscoPanel frontend"
|
msg_info "Building DiscoPanel frontend"
|
||||||
cd /opt/discopanel/web/discopanel
|
cd /opt/discopanel/web/discopanel
|
||||||
$STD npm install
|
$STD npm install
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user