Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autostart Webmenu on each MiSTer start #10

Open
yavimaya opened this issue May 12, 2020 · 2 comments
Open

Autostart Webmenu on each MiSTer start #10

yavimaya opened this issue May 12, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@yavimaya
Copy link

The initial script should offer the possibility to autostart each time you turn on MiSTer.

Maybe you can use /etc/init.d/ dir.

@yavimaya yavimaya added the enhancement New feature or request label May 12, 2020
@nilp0inter
Copy link
Owner

This one should be easy, not a priority right now, though. I'll plan to add it after game support.

@nilp0inter nilp0inter added this to the v0.6.0 milestone May 12, 2020
@nilp0inter nilp0inter modified the milestones: v0.6.0, v1.0.0 Jun 8, 2020
@Gdsimms
Copy link

Gdsimms commented Sep 25, 2020

Here's what I did:

create the file /etc/init.d/S99webmenu with the following contents:

#!/bin/sh

[ -f /media/fat/Scripts/webmenu.sh ] || exit 0

start() {
        printf "Starting WebMenu service: "
        /media/fat/Scripts/webmenu.sh
        [ $? = 0 ] && echo "OK" || echo "FAIL"
}

stop() {
        printf "Shutting down WebMenu service: "
        kill -9 `pidof WebMenu`
        [ $? = 0 ] && echo "OK" || echo "FAIL"
}

restart() {
        stop
        start
}

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

exit $?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants