Page 1 of 1

Simple start/stop for stand alone version

Posted: 22 Jun 2014, 11:00
by tokka
I don't know if may be of some interest, but in case these are the scripts i use to start/stop MS from the desktop:

Assuming your ms standalone folder is in /var/madsonic

start:

right click on the desktop - create new empty document - open it with a text editor, than past
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=OFF
Name[C]=Madsonic
Icon=/path/to/preferred/icon (NOTE: in my case this don't works with ms, dunno why)
Exec=sudo /var/madsonic/madsonic.sh
Comment[C]=
save the file and rename it in "Madsonic start", or what you prefer;

stop:
right click on the desktop - new file - open with a txt editor, than past

Code: Select all

#!/bin/sh

sudo killall java
save and close, rename it in Madsonic_stop (or what you prefer) than from terminal give:
cd Desktop
sudo chmod +x Madsonic_stop

In this way you can start/stop ms with a click from your Desk.
Hope this will be of some help

Re: Simple start/stop for stand alone version

Posted: 24 Dec 2014, 10:03
by etyrnal
sudo killall java
what if there are other java instances running that aren't related to madsonic??

Re: Simple start/stop for stand alone version

Posted: 26 Dec 2014, 00:34
by DoCC
ps aux |grep java
ps aux |grep madsonic

>>

Code: Select all

ps aux |grep madsonic
root     14548  1.0 33.2 4589240 1346324 ?     Sl   Dec22  46:12 java -Xms512m -Xmx1800m -Dmadsonic.home=/var/madsonic -Dmadsonic.host=0.0.0.0 -Dmadsonic.port=4040 -Dmadsonic.httpsPort=0 -Dmadsonic.contextPath=/ -Dmadsonic.defaultMusicFolder=/var/media/artists -Dmadsonic.defaultUploadFolder=/var/media/incoming -Dmadsonic.defaultPodcastFolder=/var/media/podcast -Dmadsonic.defaultPlaylistImportFolder=/var/media/playlists/import -Dmadsonic.defaultPlaylistExportFolder=/var/media/playlists/export -Dmadsonic.defaultPlaylistBackupFolder=/var/media/playlists/backup -Duser.timezone= -Dmadsonic.gzip= -Djava.awt.headless=true -verbose:gc -jar madsonic-booter.jar
jan      29938  0.0  0.0  10464   936 pts/0    R+   00:30   0:00 grep --color=auto madsonic
top
htop

lets you get the PID of the java process responsible for madsonic ...

#kill pid ( i.e. kill 1234 )
or
kill -9 pid ( forced )

Re: Simple start/stop for stand alone version

Posted: 22 Jan 2018, 18:38
by etyrnal
For those trying to launch headless (macOS/OS X) at system boot, with no users logged in, this may help you figure things out:

Good INFO:
http://www.launchd.info/

and this amazing app:
http://www.soma-zone.com/LaunchControl/