Skip to content

Commit

Permalink
improve sbin/ scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
lneto committed Apr 4, 2023
1 parent ee17669 commit ce9bebc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
File renamed without changes.
9 changes: 7 additions & 2 deletions sbin/lunatik.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#

LUNATIK_LIBS=(device linux)
LUNATIK_PATH=/lib/modules/lua

load() {
insmod $1.ko
Expand Down Expand Up @@ -73,7 +74,7 @@ status() {

run() {
if isloaded lunatik_run; then
sbin/lunatik.lua
sbin/lunatik
else
echo "lunatik_run is not loaded"
fi
Expand All @@ -94,7 +95,11 @@ case "$1" in
status
;;
install)
cp lunatik.lua /lib/modules/lua/
mkdir -p ${LUNATIK_PATH}
cp lunatik.lua ${LUNATIK_PATH}
chown -R root.root ${LUNATIK_PATH}
chmod 755 ${LUNATIK_PATH}
chmod 644 ${LUNATIK_PATH}/lunatik.lua
;;
run)
run
Expand Down

0 comments on commit ce9bebc

Please sign in to comment.