Add error handling for writing to /blog/index.html in _blog_index function
This commit is contained in:
1 parent
0af7129cd5
commit
953986f0af
1 file changed
+4
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user