styxit / HTPC-Manager

A fully responsive interface to manage all your favorite software on your Htpc.
http://htpc.io
MIT License
530 stars 183 forks source link

Feature Request: Run / Execute scripts & programs on server #358

Closed noobydp closed 3 years ago

noobydp commented 8 years ago

Hey styxit,

Any chance we can get a feature to execute scripts on the server? I'm thinking a simple list like the Other Apps / Custom URL section in settings, but specify a program / script that exists locally on the server?

I have previously forked HTPC-Manager and bastardized services.py to do this but it's pretty poor code (and I don't understand most of your code anymore). I used a simple subprocess and / or os.system call which seemed to work on windows and Linux hosts.

Thanks :)

Hellowlol commented 8 years ago

TIP: you can start htpc manger with --shell and have access to a cli in the stats module. Its not the same, but you can invoke scripts from there until someone does your request.

(maraschino has a script module.)

This is how they solved it: https://github.com/mrkipling/maraschino/blob/master/modules/script_launcher.py