myos
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: myos
|
||||
# Required-Start:
|
||||
# Required-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Description: System calls from https://github.com/aynicos/myos
|
||||
### END INIT INFO
|
||||
|
||||
set -e
|
||||
|
||||
# load system configs
|
||||
[ -r /etc/default/myos ] && . /etc/default/myos
|
||||
[ -r /etc/sysconfig/myos ] && . /etc/sysconfig/myos
|
||||
|
||||
# check system config
|
||||
[ -r ~/.env ] && . ~/.env || exit 1
|
||||
type make >/dev/null 2>&1 && [ -d "${MYOS}" ] || exit 2
|
||||
|
||||
case "$1" in
|
||||
*)
|
||||
IFS=$'\n'; exec env $(cat ~/.env 2>/dev/null) make -C "${MYOS}" $@
|
||||
esac
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
depend() {
|
||||
need localmount swap
|
||||
after bootmisc modules
|
||||
}
|
||||
|
||||
start() {
|
||||
/etc/init.d/myos start
|
||||
}
|
||||
|
||||
stop() {
|
||||
/etc/init.d/myos stop
|
||||
}
|
||||
|
||||
status() {
|
||||
/etc/init.d/myos status
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=System calls from https://github.com/aynicos/myos
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/etc/init.d/myos start
|
||||
ExecStop=/etc/init.d/myos stop
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
Reference in New Issue
Block a user