Create directories when restoring rss

This commit is contained in:
Bob Mottram 2018-01-24 15:18:52 +00:00
parent 8abeb56bea
commit 0b606c06d2
1 changed files with 6 additions and 0 deletions

View File

@ -176,6 +176,9 @@ function restore_local_rss {
rm -rf /etc/share/tt-rss rm -rf /etc/share/tt-rss
mv $temp_restore_dir/etc/share/tt-rss /etc/share/ mv $temp_restore_dir/etc/share/tt-rss /etc/share/
else else
if [ ! -d /etc/share/tt-rss ]; then
mkdir -p /etc/share/tt-rss
fi
cp -r $temp_restore_dir/* /etc/share/tt-rss/ cp -r $temp_restore_dir/* /etc/share/tt-rss/
fi fi
if [ ! "$?" = "0" ]; then if [ ! "$?" = "0" ]; then
@ -249,6 +252,9 @@ function restore_remote_rss {
rm -rf /etc/share/tt-rss rm -rf /etc/share/tt-rss
mv $temp_restore_dir/etc/share/tt-rss /etc/share/ mv $temp_restore_dir/etc/share/tt-rss /etc/share/
else else
if [ ! -d /etc/share/tt-rss ]; then
mkdir -p /etc/share/tt-rss
fi
cp -r $temp_restore_dir/* /etc/share/tt-rss/ cp -r $temp_restore_dir/* /etc/share/tt-rss/
fi fi
if [ ! "$?" = "0" ]; then if [ ! "$?" = "0" ]; then