Skip to content

Commit 07bf78b

Browse files
Try zmupdate.pl without super user privileges first. Maybe fixes #4503
1 parent 4c2f988 commit 07bf78b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

distros/ubuntu2004/zoneminder.postinst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@ create_update_user () {
3737

3838
update_db () {
3939

40-
zmupdate.pl -s --nointeractive
40+
zmupdate.pl --nointeractive
4141
if [ $? -ne 0 ]; then
42-
echo "Error updating db."
43-
exit 1;
42+
echo "Error updating db. Trying with super-user privileges"
43+
zmupdate.pl -s --nointeractive
44+
if [ $? -ne 0 ]; then
45+
echo "Failed updating db. Please try manually by running: sudo zmupdate.pl"
46+
exit 1;
47+
fi
4448
fi
4549
zmupdate.pl --nointeractive -f
4650
if [ $? -ne 0 ]; then

0 commit comments

Comments
 (0)