Skip to content

Commit cb079b0

Browse files
author
Kristan Kenney
committed
Back up existing config on upgrade to $HESTIA/conf/defaults/hestia.conf
1 parent c83c523 commit cb079b0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

install/upgrade/versions/1.4.0.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,13 @@ if [ "$API" = "no" ]; then
112112
echo "[ * ] Disabling API access..."
113113
$HESTIA/bin/v-change-sys-api remove
114114
fi
115-
fi
115+
fi
116+
117+
# Back up users existing configuration data to $HESTIA/conf/defaults/hestia.conf
118+
if [ ! -f "$HESTIA/conf/defaults/hestia.conf" ]; then
119+
echo "[ * ] Creating known good configuration data for system recovery..."
120+
if [ ! -d "$HESTIA/conf/defaults/" ]; then
121+
mkdir -p "$HESTIA/conf/defaults/"
122+
fi
123+
cp -f $HESTIA/conf/hestia.conf $HESTIA/conf/defaults/hestia.conf
124+
fi

0 commit comments

Comments
 (0)