summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/.local/bin/protonmail-bridge20
-rwxr-xr-xstow.sh2
2 files changed, 22 insertions, 0 deletions
diff --git a/scripts/.local/bin/protonmail-bridge b/scripts/.local/bin/protonmail-bridge
new file mode 100755
index 0000000..9114d81
--- /dev/null
+++ b/scripts/.local/bin/protonmail-bridge
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+# by ivan
+
+name="protonmail-bridge daemon"
+description=""
+#command=/usr/bin/protonmail-bridge
+command=/home/protonmail/proton-bridge
+#command_args="${protonmail-bridge_args}"
+command_args="--no-window --noninteractive"
+command_user="protonmail:protonmail"
+# protonmail-bridge does not daemonize itself
+command_background=true
+pidfile=/run/protonmail-bridge.pid
+
+depend() {
+ need net
+ use dns
+}
diff --git a/stow.sh b/stow.sh
index 6b911e4..abef6f5 100755
--- a/stow.sh
+++ b/stow.sh
@@ -4,3 +4,5 @@ rm ~/.config/mimeapps.list
rm ~/.config/user-dirs.dirs
stow -R $(ls -d */)
+
+doas ln -s "$HOME/.local/bin/protonmail-bridge" "/etc/init.d/protonmail-bridge"