Skip to content
Snippets Groups Projects
Commit 9074a7cc authored by Bob Mottram's avatar Bob Mottram
Browse files

Backup and restore nodejs file

parent 54c19d0d
No related branches found
No related tags found
No related merge requests found
......@@ -249,6 +249,9 @@ function backup_configfiles {
if [ ! -d $temp_backup_dir ]; then
mkdir -p $temp_backup_dir
fi
if [ -f $NODEJS_INSTALLED_APPS_FILE ]; then
cp -f $NODEJS_INSTALLED_APPS_FILE $temp_backup_dir
fi
cp -f $CONFIGURATION_FILE $temp_backup_dir
cp -f $COMPLETION_FILE $temp_backup_dir
if [ -f $BACKUP_EXTRA_DIRECTORIES ]; then
......
......@@ -114,6 +114,9 @@ function backup_configfiles {
if [ ! -d $temp_backup_dir ]; then
mkdir -p $temp_backup_dir
fi
if [ -f $NODEJS_INSTALLED_APPS_FILE ]; then
cp -f $NODEJS_INSTALLED_APPS_FILE $temp_backup_dir
fi
cp -f $CONFIGURATION_FILE $temp_backup_dir
cp -f $COMPLETION_FILE $temp_backup_dir
if [ -f $BACKUP_EXTRA_DIRECTORIES ]; then
......
......@@ -108,6 +108,10 @@ function restore_configfiles {
temp_restore_dir=/root/tempconfig
restore_directory_from_usb $temp_restore_dir configfiles
if [ -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE ]; then
cp -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE $NODEJS_INSTALLED_APPS_FILE
fi
if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
if [ ! "$?" = "0" ]; then
......
......@@ -115,6 +115,10 @@ function restore_configfiles {
temp_restore_dir=/root/tempconfig
restore_directory_from_friend $temp_restore_dir configfiles
if [ -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE ]; then
cp -f $temp_restore_dir$NODEJS_INSTALLED_APPS_FILE $NODEJS_INSTALLED_APPS_FILE
fi
if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
if [ ! "$?" = "0" ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment