aboutsummaryrefslogtreecommitdiff
path: root/core/sysmgr
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-04-01 13:38:21 +0300
committerCem Keylan <cem@ckyln.com>2020-04-01 13:38:21 +0300
commit0542a6c3987990b5baf6bf45f4d49074997671e9 (patch)
tree3bf115420265b3ba3b58e43ef70fe5c8dbd34ca5 /core/sysmgr
parentb9609d25f141209c814a3473deb440d72dc72109 (diff)
downloadrepository-0542a6c3987990b5baf6bf45f4d49074997671e9.tar.gz
sysmgr: add boot, shutdown scripts. add post-install message
Diffstat (limited to 'core/sysmgr')
-rwxr-xr-xcore/sysmgr/build1
-rw-r--r--core/sysmgr/checksums2
-rw-r--r--core/sysmgr/files/sysmgr.boot1
-rw-r--r--core/sysmgr/files/sysmgr.pre.shutdown1
-rwxr-xr-xcore/sysmgr/post-install30
-rw-r--r--core/sysmgr/sources2
-rw-r--r--core/sysmgr/version2
7 files changed, 38 insertions, 1 deletions
diff --git a/core/sysmgr/build b/core/sysmgr/build
index c208b139..9ca3c9a6 100755
--- a/core/sysmgr/build
+++ b/core/sysmgr/build
@@ -1,3 +1,4 @@
#!/bin/sh -e
make DESTDIR="$1" PREFIX=/usr install
+install -Dm644 -t "$1/etc/init" sysmgr.boot sysmgr.pre.shutdown
diff --git a/core/sysmgr/checksums b/core/sysmgr/checksums
index 0dd3c625..a639e8f7 100644
--- a/core/sysmgr/checksums
+++ b/core/sysmgr/checksums
@@ -1 +1,3 @@
6e1545f718972d2926a6895c781ec968f459aa05ff9f5344bbbd94960712cc6c 0.2.0.tar.gz
+3dfdcb5386796f5560e793ce992593fc9c074389c5dba9c4cadd5281cca6de03 sysmgr.boot
+3b8da16b402ba7aa3a151d3a6a39a26f6335353930dca3a1857f13464eda7dfd sysmgr.pre.shutdown
diff --git a/core/sysmgr/files/sysmgr.boot b/core/sysmgr/files/sysmgr.boot
new file mode 100644
index 00000000..39ba1729
--- /dev/null
+++ b/core/sysmgr/files/sysmgr.boot
@@ -0,0 +1 @@
+# while :; do /usr/bin/sysmgr ; done &
diff --git a/core/sysmgr/files/sysmgr.pre.shutdown b/core/sysmgr/files/sysmgr.pre.shutdown
new file mode 100644
index 00000000..01ce6b4b
--- /dev/null
+++ b/core/sysmgr/files/sysmgr.pre.shutdown
@@ -0,0 +1 @@
+# for service in /var/sysmgr/* ; do [ -r "$service" ] && { svctl stop "${service##*/}" ; svctl kill "${service##*/}" ;} ; done
diff --git a/core/sysmgr/post-install b/core/sysmgr/post-install
new file mode 100755
index 00000000..7141e3f3
--- /dev/null
+++ b/core/sysmgr/post-install
@@ -0,0 +1,30 @@
+#!/bin/sh -e
+
+cat <<EOF
+IMPORTANT:
+
+ In order to enable sysmgr you need to
+ uncomment the line on '/etc/init/sysmgr.boot'
+ and '/etc/init/sysmgr.pre.shutdown'
+
+ You can do this as root by doing,
+ sed -i 's/# //' /etc/init/sysmgr.boot /etc/init/sysmgr.pre.shutdown
+
+ Carbs packages now come with sysmgr services by default,
+ but didn't have a release bump to avoid a rebuild just to
+ get sysmgr services. You can manually copy all your sysmgr
+ services with the following command.
+
+ mkdir -p /etc/sysmgr
+ for service in /etc/sv/* ; do
+ cp $service/run /etc/sysmgr/${service##*/}
+ done
+
+ You can then copy all the services you run in /var/service to
+ /var/sysmgr by doing,
+
+ for service in /var/service/* ; do
+ ln -sv /etc/sysmgr/${service##*/} /var/sysmgr
+ done
+
+EOF
diff --git a/core/sysmgr/sources b/core/sysmgr/sources
index d2d0f18c..11cc2808 100644
--- a/core/sysmgr/sources
+++ b/core/sysmgr/sources
@@ -1 +1,3 @@
https://github.com/cemkeylan/sysmgr/archive/0.2.0.tar.gz
+files/sysmgr.boot
+files/sysmgr.pre.shutdown
diff --git a/core/sysmgr/version b/core/sysmgr/version
index 2f7905df..8ea0e438 100644
--- a/core/sysmgr/version
+++ b/core/sysmgr/version
@@ -1 +1 @@
-0.2.0 1
+0.2.0 2