From 687aec89134ba488bf8957b49d002da5bb4f4c51 Mon Sep 17 00:00:00 2001 From: Sravan Balaji Date: Mon, 15 Aug 2022 08:39:08 -0400 Subject: [PATCH] Syncthing Systemd Service & GTK on Startup - Add systemd user service file to run syncthing daemon - Add syncthing-gtk to list of startup applications --- .config/systemd/user/syncthing.service | 12 ++++++++++++ .scripts/startup.sh | 2 ++ README.org | 21 +++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 .config/systemd/user/syncthing.service diff --git a/.config/systemd/user/syncthing.service b/.config/systemd/user/syncthing.service new file mode 100644 index 0000000..d62e545 --- /dev/null +++ b/.config/systemd/user/syncthing.service @@ -0,0 +1,12 @@ +[Unit] +Description=Syncthing + +[Service] +Type=simple +ExecStart=/usr/bin/syncthing +Restart=on-failure +RestartSec=1 +SuccessExitStatus=3 4 + +[Install] +WantedBy=default.target diff --git a/.scripts/startup.sh b/.scripts/startup.sh index 2887097..a35a036 100755 --- a/.scripts/startup.sh +++ b/.scripts/startup.sh @@ -31,6 +31,7 @@ declare -a delay_array=(\ "/usr/bin/xfce4-power-manager" \ # XFCE4 Power Manager "/usr/bin/udiskie -a -n -s" \ # Udiskie "/usr/bin/openrgb" \ # OpenRGB + "/usr/bin/syncthing-gtk" \ # Syncthing GTK # System Restore Processes "/usr/bin/autorandr --change --force" \ # Auto restore screen layout "/usr/bin/numlockx on" \ # Enable numlock @@ -46,6 +47,7 @@ declare -a kill_delay_array=(\ "killall xfce4-power-manager" \ # XFCE4 Power Manager "killall udiskie" \ # Udiskie "killall openrgb" \ # OpenRGB + "killall syncthing-gtk" \ # Syncthing GTK ) help_menu() { diff --git a/README.org b/README.org index 03d973d..1f0ca53 100644 --- a/README.org +++ b/README.org @@ -79,6 +79,7 @@ - [[#config][Config]] - [[#gtk][Gtk]] - [[#qt][Qt]] + - [[#syncthing][Syncthing]] - [[#ssh][SSH]] - [[#system-settings][System Settings]] - [[#xinit][Xinit]] @@ -7550,6 +7551,23 @@ level = "info" } #+END_SRC +** Syncthing + +#+BEGIN_SRC systemd :tangle .config/systemd/user/syncthing.service +[Unit] +Description=Syncthing + +[Service] +Type=simple +ExecStart=/usr/bin/syncthing +Restart=on-failure +RestartSec=1 +SuccessExitStatus=3 4 + +[Install] +WantedBy=default.target +#+END_SRC + * SSH #+BEGIN_SRC conf :tangle .ssh/config @@ -8271,6 +8289,7 @@ declare -a delay_array=(\ "/usr/bin/xfce4-power-manager" \ # XFCE4 Power Manager "/usr/bin/udiskie -a -n -s" \ # Udiskie "/usr/bin/openrgb" \ # OpenRGB + "/usr/bin/syncthing-gtk" \ # Syncthing GTK # System Restore Processes "/usr/bin/autorandr --change --force" \ # Auto restore screen layout "/usr/bin/numlockx on" \ # Enable numlock @@ -8286,6 +8305,7 @@ declare -a kill_delay_array=(\ "killall xfce4-power-manager" \ # XFCE4 Power Manager "killall udiskie" \ # Udiskie "killall openrgb" \ # OpenRGB + "killall syncthing-gtk" \ # Syncthing GTK ) help_menu() { @@ -8500,6 +8520,7 @@ for i in ${!source_dirs[@]}; do # Copy source dirs to target dirs rsync -a -v -L --progress --delete \ --exclude '*/dosdevices/' \ + --exclude '*/drive_c/users/sravan/' \ "${source_dirs[$i]}" \ "${target_dirs[$i]}" done