Browse Source

Update start-syncthing command

Samuel W. Flint 2 years ago
parent
commit
bf6d7e3e77
1 changed files with 9 additions and 2 deletions
  1. 9 2
      start-syncthing

+ 9 - 2
start-syncthing

@@ -1,8 +1,15 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
-if ! ps aux | grep ' [s]yncthing$' ; then
+if ! ps aux | grep '[0-9] [s]yncthing$' ; then
     echo no syncthing running
     tmu -e syncthing syncthing syncthing
 else
     echo synthing running, not starting
 fi
+
+if ! ps aux | grep ' [s]yncthing-tray' ; then
+    echo no syncthing-tray running
+    tmu -e syncthing syncthing-tray "syncthing-tray -api '${SYNCTHING_API_KEY}'"
+else
+    echo syncthing-tray running, not starting
+fi