Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Migration eines Shoutcast Servers von RH zu SuSE

Empfohlene Antworten

Veröffentlicht

Moin moin!

Unser Shoutcast Sreamserver soll von einem vserver mit RH9 auf einen rootie mit SuSE9.3 umziehen ... ich habe auf dem RH bis jetzt immer das folgende init script benutzt:


# Source networking configuration.

#. /etc/sysconfig/network


# Check that networking is up. This line may cause an error on incompatible

# distributions. Remove it if necessary. Also remove if the startup always

# fails for no apparent reason.

[[ ${NETWORKING} = "no" ]] && exit 0



stop (){

#First we want to kill the original servers, so we don't get errors.

	echo "Killing old shoutcast servers."

    for oldpid in `ps -A | grep sc_serv | cut -c 0-6`; do

    	kill -9 $oldpid

	  	if [[ $1 == "-v" ]]

		then

			echo $oldpid

		fi

	done

	rm -f /var/run/shoutcast.pid

}


start (){

#Now we can start the servers up.

	if [[ $1 == "-v" ]] 

	then

		echo "Starting up the new shoutcast servers. Starting..."

	fi


    servcount=`expr 0`

	for cfile in `ls /etc/shoutcast`; do

		echo -n $cfile

		echo -n " -> "

		grep ^RelayServer /etc/shoutcast/$cfile

		# This is the line where we actually run the shoutcast program!

		#sudo -u nobody /usr/bin/sc_serv /etc/shoutcast/$cfile > /dev/null &

		/usr/bin/sc_serv /etc/shoutcast/$cfile > /dev/null &

		let servcount=servcount+1

	done

	#Create the pid file...

	ps -A | grep sc_serv | cut -c 0-6 > /var/run/shoutcast.pid

	#Done now!

	echo "Started $servcount servers."

}


case "$1" in

	start)  	

	    if [[ ! -e /var/run/shoutcast.pid ]]

		then

			start $2


			if [[ -e /var/run/shoutcast.pid ]] 

			then		

				echo "Startup 						[SUCCESS]"

			fi

		else

			if [[ $2 == "-v" ]]

			then

				echo "Shoutcast is already running these processes:"

				#Toldja! Checks before displaying pid file.

				if [[ -e /var/run/shoutcast.pid ]]

				then

					cat /var/run/shoutcast.pid

				fi

				echo "Try calling shoutcast restart in order to kill old processes."

			else

				echo "SC_SERV is already running. Try calling shoutcast restart."

			fi

			echo "Startup 						[FAILED]"

		fi

;;


restart)

 	stop $2

  	if [[ $2 == "-v" ]]

		then

			echo "Waiting for the old servers to die..."

		fi

		sleep 4

		start $2

		if [[ -e /var/run/shoutcast.pid ]] 

		then		

			echo "Startup 						[SUCCESS]"

		fi

;;


stop)

	if [[ -e /var/run/shoutcast.pid ]];

    then

     	stop $2

		echo "Shoutcast shutdown 					[SUCCESS]"

	else

	  	echo "There are no registered shoutcast servers running right now. Attempting to kill anyways."

		stop $2

	fi

;;


*)

	echo "Usage: shoutcast (start|stop|restart) [-v]"

esac

auf der SuSE kiste läuft das aber nicht mehr so wie früher ...

auf der RH kiste hat das script 2 /usr/bin/sc_serv prozesse gestartet, da 3 konfigurationen in /etc/shoutcast lagen

auf der SuSE liegen 3 konfigurationen in /etc/shoutcast das script launcht aber immer nur den prozess mit der konfiguration, die er als erstes findet.

hab ich irgendwas verpasst oder übersehen? oder hab ich irgendwo nen unterschied zwischen suse und rh nicht gepeilt?

ich bastel da jetz schon ne weile dran rum und ich hab keinen bock das script neu zu schreiben ...

mfg

Eth

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.