06bba6f68f
0.1.0 is a complete rewrite @hippoz, @hippoz it is supposed to clean up aps. :trol:
32 lines
676 B
Bash
Executable file
32 lines
676 B
Bash
Executable file
#!/bin/sh
|
|
|
|
#############
|
|
# ALINITSYS #
|
|
#############
|
|
|
|
# ALINITSYS is a passthrough to RUNIT OR OPENRC, if RUNIT OR OPENRC exists, if not, then ALINITSYS will wrap it up and init the system.
|
|
|
|
function init(){
|
|
exec runit && echo ":: Running Runit..." || echo ":: Runit not found..." ;
|
|
exec openrc && echo ":: Running OpenRC..." || echo ":: OpenRC not found..." ;
|
|
echo ":: Running alinitsys"
|
|
}
|
|
function rescue(){
|
|
echo "[E] Something might've went wrong..."
|
|
echo ":: Dropping into the SH"
|
|
exec sh
|
|
}
|
|
function daemon(){
|
|
/var/service/*/start
|
|
}
|
|
function getty(){
|
|
echo ":: Getting TTY"
|
|
exec getty || exec stty
|
|
}
|
|
function start(){
|
|
init ||
|
|
daemon &&
|
|
getty ||
|
|
rescue
|
|
}
|
|
start
|