Aktuelles
Digital Eliteboard - Das Digitale Technik Forum

Registriere dich noch heute kostenlos, um Mitglied zu werden! Sobald du angemeldet bist, kannst du auf unserer Seite aktiv teilnehmen, indem du deine eigenen Themen und Beiträge erstellst und dich über deinen eigenen Posteingang mit anderen Mitgliedern unterhalten kannst! Zudem bekommst du Zutritt zu Bereichen, welche für Gäste verwehrt bleiben

Registriere dich noch heute kostenlos, um Mitglied zu werden! Sobald du angemeldet bist, kannst du auf unserer Seite aktiv teilnehmen, indem du deine eigenen Themen und Beiträge erstellst und dich über deinen eigenen Posteingang mit anderen Mitgliedern unterhalten kannst! Zudem bekommst du Zutritt zu Bereichen, welche für Gäste verwehrt bleiben

2 verschiedene Oscam auf einem Ubuntu

    Nobody is reading this thread right now.
AW: 2 verschiedene Oscam auf einem Ubuntu

Hi,
wenn du das Script oscam2.sh genannt hast, mußt du das beim Symlink-erstellen aber auch anpassen.
Code:
ln -s /var/emu/script/oscam2[COLOR=#ff0000].sh[/COLOR] /bin/o2
ansonsten versuch es mal mit
Code:
root@debian /var/emu/script > ./oscam2.sh [COLOR=#ff0000]start[/COLOR]

Edit: und noch eins!
Achte bitte darauf, dass du in der oscam.config überall andere Ports belegst, als auf der Hauptoscam oder du läßt diese Sektionen erstmal ganz weg.
Also nur noch die Sektionen [global] und [webif] in der oscam.config lassen.
Bei Portkonflikten geht sonst meißt auch kein WebIf mehr.

Gruß
janni1
 
Zuletzt bearbeitet:
AW: 2 verschiedene Oscam auf einem Ubuntu

Hi Janni..
Da hätte ich selber drauf kommen können..
Nun wird Oscam laut Ausgabe gestartet...
Such ich nach dem Prozess, läuft allerdings nichts

Code:
root@debian ~ > o2 start[SCRIPT] start: Oscam Server2
root@debian ~ > ps ax | grep oscam2.x86_64
16354 pts/0    S+     0:00 grep oscam2.x86_64

Die Binary liegt in /var/emu/oscam2 (Ist die gleiche Binary meiner Hauptinstanz, nur umbenannt in oscam2.x86_64 und Rechte antürlich auf 755 gesetzt)
Und die configs liegen in /var/etc/oscam2
Hab die oscam.conf die ganze Zeit schon aufs mindeste gekürzt

Code:
[global]
logfile = /tmp/oscam.log
nice = -1
maxlogsize = 1500
preferlocalcards = 1




[webif]
httpport                      = 8088
httpuser                      = oscam
httppwd                       = oscam
httprefresh                   = 10
httpshowecminfo               = 1
httpallowed                   = 192.168.0.0-192.168.255.255
aulow                         = 120
hideclient_to                 = 15

Versteh es nicht =(
 
AW: 2 verschiedene Oscam auf einem Ubuntu

Hi,
sorry, ich langsam auch nicht mehr.

Was passiert denn bei:
Code:
root@debian /var/emu/script > ./oscam2.sh [COLOR=#000000]start[/COLOR]
?

Gruß
janni1
 
AW: 2 verschiedene Oscam auf einem Ubuntu

Das gleiche :/

Code:
root@debian ~ > cd /var/emu/script/root@debian /var/emu/script > ./oscam2.sh start
[SCRIPT] start: Oscam Server2
root@debian /var/emu/script > ps ax | grep oscam2.x86_64
 4665 pts/0    S+     0:00 grep oscam2.x86_64
root@debian /var/emu/script >
 
AW: 2 verschiedene Oscam auf einem Ubuntu

Hi,
und mit:
Code:
  /var/emu/oscam2/oscam2.x86_64 -b -c /var/etc/oscam2 -t /tmp/.oscam2
?
Pfad ggf. bitte anpassen.

Gruß
janni1
 
AW: 2 verschiedene Oscam auf einem Ubuntu

Hatte ich am Anfang schon probiert..

Code:
root@debian /var/emu/script > /var/emu/oscam2/oscam2.x86_64 -b -c /var/etc/oscam2 -t /tmp/.oscam2root@debian /var/emu/script > ps ax | grep oscam2.x86_64
 8166 pts/0    S+     0:00 grep oscam2.x86_64

Ich versuch jetzt mal ne neue oscam zu compilen

Edit
So nun rennt das ganze endlich..
Nach Link ist nicht mehr aktiv. HowTo eine Binary compilet
Die Binary von /usr/local/bin/oscam nach var/emu/oscam2 kopiert, rechte angepasst und die ganzen Pfäde von jannis Script angepasst
mit o2 start Oscam gestartet und nun rennt das ganz =) =)

Danke janni für deine Geduld =)

Achja, für den Watchdog kann ich nach hwmmc HotWo aus Post Link ist nicht mehr aktiv. vorgehen oder?
 
Zuletzt bearbeitet:
AW: 2 verschiedene Oscam auf einem Ubuntu

Hi,
ich kann nur noch soviel dazu sagen.
Hab es eben mal schnell auf dem Igel nachgeklimpert.
Code:
root@igel ~ > o2 start
[SCRIPT] start: Oscam Server2
root@igel ~ > ps ax | grep oscam2.x86
 3621 ?        Ss     0:00 /var/emu/oscam2/oscam2.x86 -b -c /var/etc/oscam2 -t /tmp/.oscam2
 3622 ?        Sl     0:00 /var/emu/oscam2/oscam2.x86 -b -c /var/etc/oscam2 -t /tmp/.oscam2
 3631 pts/0    S+     0:00 grep oscam2.x86
root@igel ~ > o2 stop
[SCRIPT] stop: Oscam Server2
root@igel ~ > ps ax | grep oscam2.x86
 3642 pts/0    S+     0:00 grep oscam2.x86
root@igel ~ > /var/emu/oscam2/oscam2.x86 -b -c /var/etc/oscam2 -t /tmp/.oscam2
root@igel ~ > ps ax | grep oscam2.x86
 3645 ?        Ss     0:00 /var/emu/oscam2/oscam2.x86 -b -c /var/etc/oscam2 -t /tmp/.oscam2
 3646 ?        Sl     0:00 /var/emu/oscam2/oscam2.x86 -b -c /var/etc/oscam2 -t /tmp/.oscam2
 3654 pts/0    S+     0:00 grep oscam2.x86
root@igel ~ > o2 stop
[SCRIPT] stop: Oscam Server2
root@igel ~ >
Du musst angemeldet sein, um Bilder zu sehen.
Komisch, bei mir läuft das. Keine Ahnung warum bei dir nicht, sorry.

Gruß
janni1
 
AW: 2 verschiedene Oscam auf einem Ubuntu

Keine Ahnung... vll lag es doch an der Binary?
Mit der neuen klappt es jetzt wunderbar, vielen Dank nochmal Janni
 
AW: 2 verschiedene Oscam auf einem Ubuntu

Hi,
puh, na das ist doch toll, dass es jetzt läuft.
Den watchdog von hwmmc kannst du dir anpassen.
Ich mach das immer gleich z.B. so ungefähr:
Code:
#!/bin/bash
TIMESTAMP=$(date +"%d.%m.%Y %H:%M:%S")
PID="$(pgrep -x oscam2.x86_64)"
if [[ ! -z $PID ]] ; then
    echo "$TIMESTAMP    OSCam Server laeuft"
else
    echo "$TIMESTAMP    OSCam neu gestartet" >> /var/log/ipc/OScam2-watchdog.log
    o2 start
fi

exit 0
und das ganze per Cron jede Minute laufen lassen.

Gruß
 
AW: 2 verschiedene Oscam auf einem Ubuntu

Bei mir habe ich zwar 2 Instanzen am laufen (frisch kompiliert, danke an Janni!), aber wenn ich den VPS reboote, starten die Instanzen nicht automatisch mit. Irgendwo hab ich noch einen Fehler drin.

OSCam Binarys: /oscam. Die heißen oscam1 + oscam2
Config Files: /oscam-configs1 + oscam-configs2

Scripte: o1 & o2 in /bin
watchdog: o1-watchdog.sh & o2-watchdog.sh

Scripte o1 & o2:
#!/bin/bash
#
#
CAMNAME="OScam-ONE"
# end
# Diese Methode startet OScam1
start_cam ()
{
pkill -9 oscam1
sleep 2
/oscam/oscam1 -b -c /oscam-configs1 -t /tmp/.oscam1 &
}
# Diese methode stoppt Oscam1
stop_cam ()
{
pkill -9 oscam1
}
case "$1" in
start)
echo "[SCRIPT] $1: $CAMNAME"
start_cam
;;
stop)
echo "[SCRIPT] $1: $CAMNAME"
stop_cam
;;
restart)
echo "Restarting $CAMNAME"
stop_cam
sleep 7
start_cam
;;
*)
"$0" stop
exit 1
;;
esac
exit 0

#!/bin/bash
#
#
CAMNAME="OScam-TWO"
# end
# Diese Methode startet OScam2
start_cam ()
{
pkill -9 oscam2
sleep 2
/oscam/oscam2 -b -c /oscam-configs2 -t /tmp/.oscam2 &
}
# Diese methode stoppt Oscam2
stop_cam ()
{
pkill -9 oscam2
}
case "$1" in
start)
echo "[SCRIPT] $1: $CAMNAME"
start_cam
;;
stop)
echo "[SCRIPT] $1: $CAMNAME"
stop_cam
;;
restart)
echo "Restarting $CAMNAME"
stop_cam
sleep 7
start_cam
;;
*)
"$0" stop
exit 1
;;
esac
exit 0

watchdog files:
#!/bin/sh
OSCAMPATH="/oscam"
OSCAMNAME="oscam1"
LOGFILE="OScam_restart_log.txt"

if [ $(ps aux | grep -v grep | grep -c "/oscam/oscam1") = 0 ];
then
echo $(date "+%d.%m.%y|%H:%M:%S|OSCam1 wurde neu gestartet") >> /oscam/log/$LOGFILE
$OSCAMPATH/$OSCAMNAME -b -c /oscam1 -t /tmp/.oscam1 restart
else
echo "all fine :)"
fi

exit 0


#!/bin/sh
OSCAMPATH="/oscam"
OSCAMNAME="oscam2"
LOGFILE="OScam2_restart_log.txt"

if [ $(ps aux | grep -v grep | grep -c "/oscam/oscam2") = 0 ];
then
echo $(date "+%d.%m.%y|%H:%M:%S|OSCam2 wurde neu gestartet") >> /oscam/log/$LOGFILE
$OSCAMPATH/$OSCAMNAME -b -c /oscam2 -t /tmp/.oscam2 restart
else
echo "all fine :)"
fi

exit 0

crontab
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
#OScam
* * * * * root /bin/o1-watchdog.sh #OScam - Teste ob OScam laeuft (jede Minute)
#30 4 * * * root /bin/o1-watchdog.sh #OScam - EMU Neustart (Taeglich um 04:30)

#OScam2
* * * * * root /bin/o2-watchdog.sh #OScam2 - Teste ob OScam laeuft (jede Minute)
#20 04 * * * root /bin/o2-watchdog.sh #OScam2 - EMU Neustart (Taeglich um 04:20)

rc.local
/bin/sh -e
#
# rc.local
#
# Zum Autostarten eines Emu's einfach "#" am Anfang der Zeile entfernen

#Camd3 starten
#/bin/camd3 start &

#OScam1 starten
o1 start &

#OScam2 starten
o2 start &

#CCcam starten
#/bin/cccam start &

#NewCS starten
#/bin/newcs start &

#sBox starten
#/bin/sbox start &

#OSEmu starten
#/bin/osemu start &

exit 0
 
AW: 2 verschiedene Oscam auf einem Ubuntu

Hi cilow,

ändere in deine rc.local
Code:
#OScam1 starten
o1 start &
zu
Code:
#OScam1 starten
/bin/o1 start &
das ganze für o2 genau so

Gruß
janni1
 
AW: 2 verschiedene Oscam auf einem Ubuntu

Hi,
also ich würde es auf die Schnelle so machen:
Die Bin namens oscam2.x86_64 nach /var/emu/oscam2/
Dann Rechte setzen nicht vergessen.
Die Configs kämen nach /var/etc/oscam2
Code:
#!/bin/bash
#
#
CAMNAME="Oscam Server2" 
# end
# Diese Methode startet Oscam2
start_cam () 
{ 
pkill -9 oscam2.x86_64 
sleep 2
/var/emu/oscam2/oscam2.x86_64 -b -c /var/etc/oscam2 -t /tmp/.oscam2 &
} 
# Diese methode stoppt Oscam2
stop_cam () 
{ 
pkill -9 oscam2.x86_64 
} 
case "$1" in 
start) 
echo "[SCRIPT] $1: $CAMNAME" 
start_cam 
;; 
stop) 
echo "[SCRIPT] $1: $CAMNAME" 
stop_cam 
;; 
restart) 
echo "Restaring $CAMNAME" 
stop_cam 
sleep 7
start_cam 
;; 
*) 
"$0" stop 
exit 1 
;; 
esac 
exit 0
Dieses Script würde ich oscam2 nennen und mit ausführbaren Rechten nach /var/emu/script/ legen.
Jetzt noch eine Verknüpfung nach /bin anlegen.
Code:
ln -s /var/emu/script/oscam2 /bin/o2
Jetzt könntest du -wenn ich mich nicht verhauen hab- oscam2 über die Konsole starten/stoppen/neustarten mit "o2 start/stop/restart"

Aber als allererstes sollte das Starten erstmal über diesen Aufruf funktionieren:
Code:
 /var/emu/oscam2/oscam2.x86_64 -b -c /var/etc/oscam2 -t /tmp/.oscam2

Gruß
janni1

Hi Janni, ich muss nochmal den Beitrag rausholen, weil ich gerne die 2te instanz über die Konsole mit der Verknüpfung starten würde..
Starte ich sie direkt, also mit /var/emu/oscam2/oscam2.x86_64 -b -c /var/etc/oscam2 -t /tmp/.oscam2 funktioniert das ganze wunderbar,
aber über dein Script bekomme ich immer folgende Ausgabe
Code:
root@debian ~ > o2 start-bash: o2: command not found

Und im WinSCP ist das Symbol der Verknüpfung rot hinterlegt, hast du ne Ahnung was da noch falsch sein könnte?
 
Zuletzt bearbeitet von einem Moderator:
AW: 2 verschiedene Oscam auf einem Ubuntu

Klarer Eingabefehler.
Der Befehl muss dan auch o2 start und nicht o2 start-bash heißen
 
AW: 2 verschiedene Oscam auf einem Ubuntu

Ich hab o2 start eingegeben.. der Zeilen Umbruch ist bisschen ungünstig

Code:
root@debian ~ > o2 start
-bash: o2: command not found
 
Zurück
Oben