Simple start/stop for stand alone version

Scripts for Madsonic

Simple start/stop for stand alone version

Unread postby tokka » 22 Jun 2014, 11:00

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
tokka
 
Posts: 7
Joined: 18 Jul 2013, 11:21
Has thanked: 5 times
Been thanked: 10 times

Re: Simple start/stop for stand alone version

Unread postby etyrnal » 24 Dec 2014, 10:03

sudo killall java


what if there are other java instances running that aren't related to madsonic??
etyrnal
 
Posts: 62
Joined: 04 Nov 2013, 05:56
Has thanked: 35 times
Been thanked: 10 times

Re: Simple start/stop for stand alone version

Unread postby DoCC » 26 Dec 2014, 00:34

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 )
User avatar
DoCC
Contributor
Contributor
 
Posts: 210
Joined: 25 Feb 2014, 14:41
Location: UpperBavaria : ))
Has thanked: 41 times
Been thanked: 71 times


Return to Scripts

Who is online

Users browsing this forum: No registered users and 1 guest