Run shutdown script but don't quit mms

Moderator: Moderator

parti02
veteran
Posts: 232
Joined: Sat Jun 16, 2007 5:52 pm

Run shutdown script but don't quit mms

Postby parti02 » Mon Jul 09, 2007 7:16 pm

My System only starts for mms, but it takes too long.

The idea is, if i click on "Beenden", a command like "echo 4 > sleep" runs, but mms don't stops.

On the next time i boot my pc i must only read the data from Harddisk.

Perhaps with an option in the config file "Quit MMS yes/no" behind the shutdown script.

Is it possible?
Is it useful?

Gruß
Parti

User avatar
acmelabs
Overlord
Posts: 2365
Joined: Mon Feb 20, 2006 9:18 pm
Location: Germany
Contact:

Re: Run shutdown script but don't quit mms

Postby acmelabs » Tue Jul 10, 2007 6:08 am

parti02 wrote:My System only starts for mms, but it takes too long.

The idea is, if i click on "Beenden", a command like "echo 4 > sleep" runs, but mms don't stops.

On the next time i boot my pc i must only read the data from Harddisk.

Perhaps with an option in the config file "Quit MMS yes/no" behind the shutdown script.

Is it possible?
Is it useful?

Gruß
Parti

I'm afraid I don't understand your idea, but nevertheless, you can always kill MMS from outside gracefully, that's no problem. MMS recalls things like volume and playlist position if you start it again.

Me, personally solved the problem concerning the long start-up (boot) time by sending the whole system to S3 (Suspend to RAM). If you have a server running, you can connect your LIRC to your server, this way you can wake up your MMS with a remote also, and this whole procedure takes here about 10secs. VDR is available after 15secs, so MMS if 5 secs faster :-) . But to be honest, it took me a while to get there, where I am now.

Regards,
Andreas

parti02
veteran
Posts: 232
Joined: Sat Jun 16, 2007 5:52 pm

Postby parti02 » Tue Jul 10, 2007 12:19 pm

The idea is to write all memory (with a running MMS) on the Harddisk , then the computer stops complete (S4) and shutting down.

When i start my computer again, the kernel must only read the old memory from harddisk, and i have a running mms during a few seconds i think.

It s is more faster than a normal boot.


If i stop mms and run the shutting down script, i must start mms manually after the next boot.

Gruß
Parti

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Postby Uatschitchun » Tue Jul 10, 2007 1:59 pm

Do a script that issues your desired command(s) and call it via irexec or (better cause within MMS and no extra remote button is used) compile MMS with games enabled and call the script from there ;)
Or manage it via Powerbutton within

Code: Select all

/etc/acpi/powerbtn.sh
Lg
Roman

parti02
veteran
Posts: 232
Joined: Sat Jun 16, 2007 5:52 pm

Postby parti02 » Tue Jul 10, 2007 3:54 pm

What means "better cause within MMS and no extra remote button is used"?
Perhaps edit the source?

I don't know if i can say it right.
In the source there must be a function or anything else that "quit" mms, when i click on beenden!

Is it hard to change "quit" with "echo 4 > sleep" before i compile?

This should be the best way for me.

Gruß
Dirk

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Postby Uatschitchun » Tue Jul 10, 2007 5:01 pm

parti02 wrote:What means "better cause within MMS and no extra remote button is used"?

If you mis-use the game-module for executing your sleep-script, it's from within MMS and you won't need a separate remote-button like for irexec ...

Perhaps edit the source?

Do what ever you want ;)

My tip:
Use irexec, powerbtn.sh, script in game-module (u can even re-translate game-module in your .po to name "Scripts" (or whatever) to call sleep or just call MMS after wakeup ...

See this section in /etc/hibernate/common.conf

Code: Select all

### misclaunch
OnSuspend 20 echo "Good night!"
OnResume 20 echo "Good morning!"


and for further reading:

Code: Select all

man hibernate
man hbernate.conf
zless /usr/share/doc/hibernate/SCRIPTLET-API.gz


With this U should be able to just quit MMS,defining your sleep-command in /etc/mms/config and let a wakeup relaunch MMS ...
Lg

Roman

parti02
veteran
Posts: 232
Joined: Sat Jun 16, 2007 5:52 pm

Postby parti02 » Tue Jul 10, 2007 5:41 pm

Yes, this is a great idea!

Juhuuu :D

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Postby Uatschitchun » Tue Jul 10, 2007 7:51 pm

Btw. ... with quitting MMS you save your last playlist, too! It won't get saved with killing MMS ;)
Lg

Roman

User avatar
acmelabs
Overlord
Posts: 2365
Joined: Mon Feb 20, 2006 9:18 pm
Location: Germany
Contact:

Postby acmelabs » Wed Jul 11, 2007 7:08 am

Uatschitchun wrote:Btw. ... with quitting MMS you save your last playlist, too! It won't get saved with killing MMS ;)

MMS remembers the last playlist position and volume level if you kill it gracefully (w/o "-9"). That means the same functions are called to shutdown MMS on a gracefull kill.
My S3-Shutdown-Script kills MMS, and my volume and playlist positions are being stored. This is a features Anders implemented about half a year ago, or even longer.

Regards,
Andreas

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Postby Uatschitchun » Wed Jul 11, 2007 12:45 pm

Ah yes ... I remember :oops:
Lg

Roman


Return to “feature requests”

Who is online

Users browsing this forum: No registered users and 1 guest