Add error handling for writing to /blog/index.html in _blog_index function
This commit is contained in:
parent
0af7129cd5
commit
953986f0af
5
qsgen2
5
qsgen2
@ -919,7 +919,10 @@ function _blog_index() {
|
||||
_msg debug "_blog_index: Content of blog_index_content"
|
||||
_msg sub "${blog_index_content}"
|
||||
fi
|
||||
echo "$blog_index_content" > ${www_root}/blog/index.html
|
||||
echo "$blog_index_content" > ${www_root}/blog/index.html || {
|
||||
echo "Failed to write to ${www_root}/blog/index.html"
|
||||
exit 1
|
||||
}
|
||||
_f_last_updated ${www_root}/blog/index.html
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user