summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xservices/smartd/finish3
-rwxr-xr-xservices/smartd/run2
l---------services/smartd/supervise1
3 files changed, 6 insertions, 0 deletions
diff --git a/services/smartd/finish b/services/smartd/finish
new file mode 100755
index 0000000..85e568f
--- /dev/null
+++ b/services/smartd/finish
@@ -0,0 +1,3 @@
+#!/bin/sh 
+# no devices found, disable smartd
+[ $1 = 17 ] && sv d $(dirname $0)
diff --git a/services/smartd/run b/services/smartd/run
new file mode 100755
index 0000000..1dc3cc9
--- /dev/null
+++ b/services/smartd/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec smartd -n
diff --git a/services/smartd/supervise b/services/smartd/supervise
new file mode 120000
index 0000000..381b7e4
--- /dev/null
+++ b/services/smartd/supervise
@@ -0,0 +1 @@
+/run/runit/supervise.smartd
\ No newline at end of file