Update csync2-rm-ssl-cert for sqlite3
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/csync2?expand=0&rev=30
This commit is contained in:
parent
efee49c243
commit
b6902ce2f7
@ -15,7 +15,7 @@ END
|
||||
exit 0
|
||||
fi
|
||||
|
||||
DBFILE=/var/lib/csync2/$(hostname).db
|
||||
DBFILE=/var/lib/csync2/$(hostname).db3
|
||||
if [ ! -f "$DBFILE" ]; then
|
||||
echo "Local csync2 database ($DBFILE) not found."
|
||||
exit 1
|
||||
@ -26,7 +26,7 @@ PEERNAME=$(echo $1 | sed -e "s/['\"]//g")
|
||||
|
||||
certcount()
|
||||
{
|
||||
echo "SELECT COUNT(peername) FROM x509_cert WHERE peername='$1';" | sqlite $DBFILE
|
||||
echo "SELECT COUNT(peername) FROM x509_cert WHERE peername='$1';" | sqlite3 $DBFILE
|
||||
}
|
||||
|
||||
if [ $(certcount "$PEERNAME") -eq 0 ]; then
|
||||
@ -34,7 +34,7 @@ if [ $(certcount "$PEERNAME") -eq 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "DELETE FROM x509_cert WHERE peername='$PEERNAME';" | sqlite $DBFILE
|
||||
echo "DELETE FROM x509_cert WHERE peername='$PEERNAME';" | sqlite3 $DBFILE
|
||||
|
||||
if [ $(certcount "$PEERNAME") -ne 0 ]; then
|
||||
echo "Error removing certificate for '$PEERNAME' from local database."
|
||||
|
Loading…
Reference in New Issue
Block a user