summarylogtreecommitdiffstats
path: root/trilium.sh
blob: 7148c21eddc3a16d70d1a56c512b77b6b10c5c9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

for i in "$@"; do
  case $i in
    --disable-tls-certificate-check)
      export NODE_TLS_REJECT_UNAUTHORIZED=0 # Allows for certificates which aren't in the system's store
      shift                                 # This decreases security and shouldn't be used regularly in untrusted networks.
      ;;
    --safe-mode)
      export TRILIUM_SAFE_MODE=1            # Enables some extra safety measures (i.e. disabling user scripting) to allow Trilium to load
      _safemodecmdargs="--disable-gpu"
      shift                                 # if something user-defined is causing it to crash
      ;;
    *)
      ;;
  esac
done    

export ELECTRON_IS_DEV=0 # Without this env variable Arch's Electron would open devtools by default

exec electron@electronversion@ /usr/lib/trilium/app.asar $_safemodecmdargs $@