Skip to content

Commit 6db09ee

Browse files
mastrolinuxmatteosuppo
authored andcommitted
Do not install cert if chrome is not installed
1 parent 218060d commit 6db09ee

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

utils/certmanager.sh

+3-7
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,11 @@ if cmd_exists apt-get; then
3535
DBDIR="$HOME/.pki/nssdb"
3636
$su_graph apt-get install libnss3-tools
3737

38-
# if the dir does not exists, create the cert db
38+
# add the cert only if the db exists already
3939
stat $DBDIR
40-
if [ "$?" -ne "0" ]; then
41-
mkdir -p $DBDIR
42-
certutil -d sql:$DBDIR --empty-password -N
40+
if [ "$?" -eq "0" ]; then
41+
certutil -d sql:$DBDIR -A -t "C,," -n Arduino -i $1
4342
fi
4443

45-
certutil -d sql:$DBDIR -A -t "C,," -n Arduino -i $1
4644
fi
4745
exit $?
48-
49-

0 commit comments

Comments
 (0)