Skip to content

Commit

Permalink
Added start service for init.d
Browse files Browse the repository at this point in the history
  • Loading branch information
jdevelop committed Apr 18, 2019
1 parent 5b2be81 commit eee4801
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions buildroot/board/rootfs_overlay/etc/init.d/S41passkeeper
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

PIDFILE=/run/passkeeper.pid

start() {
modprobe -a dwc2
mount -t configfs none /sys/kernel/config
/root/service -d oled -c /root/.seedkeeper 2>&1 & >> /root/service.logs
echo $! > "$PIDFILE"
}

stop() {
kill `cat $PIDFILE`
}

case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo "Usage: $0 {start}"
exit 1
esac

exit $?

0 comments on commit eee4801

Please sign in to comment.