aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2015-07-09 10:18:59 +0200
committerDuncaen <mail@duncano.de>2015-07-09 10:18:59 +0200
commit776ee157ef481fa47385a6c88b29cc1653475acc (patch)
treebff47a04c4fad1793b6bb05de06c674288b9a4c7
parentd432b08cd6a0c2f35b3e19b55ed4f2a197027b82 (diff)
downloaddotfiles-776ee157ef481fa47385a6c88b29cc1653475acc.tar.gz
add runsvdir-duncan service
-rw-r--r--sv/runsvdir-duncan/env/HOME1
-rw-r--r--sv/runsvdir-duncan/env/LOGNAME1
-rw-r--r--sv/runsvdir-duncan/env/SHELL1
-rw-r--r--sv/runsvdir-duncan/env/USER1
-rwxr-xr-xsv/runsvdir-duncan/finish4
-rwxr-xr-xsv/runsvdir-duncan/run5
6 files changed, 13 insertions, 0 deletions
diff --git a/sv/runsvdir-duncan/env/HOME b/sv/runsvdir-duncan/env/HOME
new file mode 100644
index 0000000..31318f3
--- /dev/null
+++ b/sv/runsvdir-duncan/env/HOME
@@ -0,0 +1 @@
+/home/duncan
diff --git a/sv/runsvdir-duncan/env/LOGNAME b/sv/runsvdir-duncan/env/LOGNAME
new file mode 100644
index 0000000..a2594c1
--- /dev/null
+++ b/sv/runsvdir-duncan/env/LOGNAME
@@ -0,0 +1 @@
+duncan
diff --git a/sv/runsvdir-duncan/env/SHELL b/sv/runsvdir-duncan/env/SHELL
new file mode 100644
index 0000000..1e282ea
--- /dev/null
+++ b/sv/runsvdir-duncan/env/SHELL
@@ -0,0 +1 @@
+/usr/bin/mksh
diff --git a/sv/runsvdir-duncan/env/USER b/sv/runsvdir-duncan/env/USER
new file mode 100644
index 0000000..a2594c1
--- /dev/null
+++ b/sv/runsvdir-duncan/env/USER
@@ -0,0 +1 @@
+duncan
diff --git a/sv/runsvdir-duncan/finish b/sv/runsvdir-duncan/finish
new file mode 100755
index 0000000..e2f2ba3
--- /dev/null
+++ b/sv/runsvdir-duncan/finish
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+sv -w600 force-stop /home/duncan/service/*
+sv exit /home/duncan/service/*
diff --git a/sv/runsvdir-duncan/run b/sv/runsvdir-duncan/run
new file mode 100755
index 0000000..af2e1d0
--- /dev/null
+++ b/sv/runsvdir-duncan/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+exec 2>&1
+# exec chpst -u duncan -e ./env runsvdir /home/duncan/service
+exec su -l -c "exec runsvdir /home/duncan/service" duncan