meyermario
Newbie
- Registriert
- 22. September 2011
- Beiträge
- 14
- Reaktionspunkte
- 0
- Punkte
- 1
hi habe ein Problem Camd funkt super nur leider das Start script nicht er bringt mir immer
/bin/camd3: Zeile 6: readipccfg: Kommando nicht gefunden.
IPC - Paket Konfigurationsfehler!
läuft auf einem Ubuntu Server ...
danke schon im vorraus
aso script
/bin/camd3: Zeile 6: readipccfg: Kommando nicht gefunden.
IPC - Paket Konfigurationsfehler!
läuft auf einem Ubuntu Server ...
danke schon im vorraus
aso script
#!/bin/bash
# IPC - MASTERSCRIPT (Camd3)
#
. /var/emu/script/functions.sh
readipccfg
[ -z $CDVERSION ] && clear && echo -e "\033[1;31mVariablen Konfigurationsfehler!\033[0m" && exit 1
[ -z $CDBIN ] && clear && echo -e "\033[1;31mVariablen Konfigurationsfehler!\033[0m" && exit 1
[ -z $CDCFG ] && clear && echo -e "\033[1;31mVariablen Konfigurationsfehler!\033[0m" && exit 1
[ -z $CDLOG ] && clear && echo -e "\033[1;31mVariablen Konfigurationsfehler!\033[0m" && exit 1
[ -z $CRON ] && clear && echo -e "\033[1;31mIPC - Paket Konfigurationsfehler!\033[0m" && exit 1
CAMNAME="Camd3"
controllCamd3="$CAMBINS/camd3/pcamd"
# This method starts Camd3
start_cam() {
if [ ! -z "$CDLOG" ]; then
$CDBIN >$CDLOG &
else
$CDBIN >/dev/null 2>&1 &
fi
if [ $? -ne "0" ]; then
echo "Fehler beim starten von $CAMNAME!"
fi
}
# This method starts Camd3 with Logging to Console
log_cam() {
$CDBIN &
if [ $? -ne "0" ]; then
echo "\033[1;31mFehler beim starten von $CAMNAME!\033[0m"
fi
}
# This method stops Camd3
stop_cam() {
$controllCamd3 -kill >/dev/null 2>&1
pkill -9 $CDVERSION
}
case "$1" in
start)
PID="$(pgrep -x $CDVERSION)"
if [[ ! -z $PID ]] ; then
echo "$CAMNAME : ist bereits gestartet"
else
start_cam
echo "$CAMNAME : gestartet"
if [[ $CRON == 1 ]]; then
PID="$(pgrep -x cron)"
if [[ ! -z $PID ]] ; then
dummy="1"
else
/etc/init.d/cron start > /dev/null
echo "Cron : gestartet"
fi
fi
fi
;;
lstart)
PID="$(pgrep -x $CDVERSION)"
if [[ ! -z $PID ]] ; then
echo "$CAMNAME : ist bereits gestartet"
else
log_cam
echo "$CAMNAME : wurde gestartet mit ConsolenLog"
fi
;;
stop)
PID="$(pgrep -x $CDVERSION)"
if [[ ! -z $PID ]] ; then
stop_cam
echo "$CAMNAME : beendet"
if [[ $CRON == 1 ]]; then
PID="$(pgrep -x cron)"
if [[ ! -z $PID ]] ; then
/etc/init.d/cron stop > /dev/null
echo "Cron : beendet"
else
echo "Cron : ist bereits beendet"
fi
fi
else
echo "$CAMNAME : ist bereits beendet"
fi
;;
restart)
echo "$CAMNAME : restart"
stop_cam
sleep 3
start_cam
;;
help)
clear
less $CAMBINS/script/camd3-help.txt
;;
log)
clear
echo "$CAMNAME Log - Abbrechen mit [Strg]+[C] $(date +"%d.%m.%Y %H:%M")"
echo "==============================================================================="
echo ""
if [ -f $CDLOG ] ; then
tail -f $CDLOG
else
echo "Keine Logdatei vorhanden!"
fi
;;
*)
clear
echo -e "\033[1;37m$CAMNAME-Server IPC $IPCVERSION $(date +"%d.%m.%Y %H:%M")\033[0m"
echo "==============================================================================="
echo ""
echo -e "Befehlsliste: \033[1;31mcamd3\033[0m"
echo ""
echo -e "\033[1;37m Hilfe zu Befehlen\033[0m \033[1;31mhelp\033[0m"
echo -e "\033[1;37m Start, Stop, Restart\033[0m \033[0;37mstart | lstart | stop | restart\033[0m"
echo -e "\033[1;37m Logfile\033[0m \033[0;37mlog\033[0m"
echo ""
echo "==============================================================================="
echo ""
exit 1
;;
esac
exit 0
# IPC - MASTERSCRIPT (Camd3)
#
. /var/emu/script/functions.sh
readipccfg
[ -z $CDVERSION ] && clear && echo -e "\033[1;31mVariablen Konfigurationsfehler!\033[0m" && exit 1
[ -z $CDBIN ] && clear && echo -e "\033[1;31mVariablen Konfigurationsfehler!\033[0m" && exit 1
[ -z $CDCFG ] && clear && echo -e "\033[1;31mVariablen Konfigurationsfehler!\033[0m" && exit 1
[ -z $CDLOG ] && clear && echo -e "\033[1;31mVariablen Konfigurationsfehler!\033[0m" && exit 1
[ -z $CRON ] && clear && echo -e "\033[1;31mIPC - Paket Konfigurationsfehler!\033[0m" && exit 1
CAMNAME="Camd3"
controllCamd3="$CAMBINS/camd3/pcamd"
# This method starts Camd3
start_cam() {
if [ ! -z "$CDLOG" ]; then
$CDBIN >$CDLOG &
else
$CDBIN >/dev/null 2>&1 &
fi
if [ $? -ne "0" ]; then
echo "Fehler beim starten von $CAMNAME!"
fi
}
# This method starts Camd3 with Logging to Console
log_cam() {
$CDBIN &
if [ $? -ne "0" ]; then
echo "\033[1;31mFehler beim starten von $CAMNAME!\033[0m"
fi
}
# This method stops Camd3
stop_cam() {
$controllCamd3 -kill >/dev/null 2>&1
pkill -9 $CDVERSION
}
case "$1" in
start)
PID="$(pgrep -x $CDVERSION)"
if [[ ! -z $PID ]] ; then
echo "$CAMNAME : ist bereits gestartet"
else
start_cam
echo "$CAMNAME : gestartet"
if [[ $CRON == 1 ]]; then
PID="$(pgrep -x cron)"
if [[ ! -z $PID ]] ; then
dummy="1"
else
/etc/init.d/cron start > /dev/null
echo "Cron : gestartet"
fi
fi
fi
;;
lstart)
PID="$(pgrep -x $CDVERSION)"
if [[ ! -z $PID ]] ; then
echo "$CAMNAME : ist bereits gestartet"
else
log_cam
echo "$CAMNAME : wurde gestartet mit ConsolenLog"
fi
;;
stop)
PID="$(pgrep -x $CDVERSION)"
if [[ ! -z $PID ]] ; then
stop_cam
echo "$CAMNAME : beendet"
if [[ $CRON == 1 ]]; then
PID="$(pgrep -x cron)"
if [[ ! -z $PID ]] ; then
/etc/init.d/cron stop > /dev/null
echo "Cron : beendet"
else
echo "Cron : ist bereits beendet"
fi
fi
else
echo "$CAMNAME : ist bereits beendet"
fi
;;
restart)
echo "$CAMNAME : restart"
stop_cam
sleep 3
start_cam
;;
help)
clear
less $CAMBINS/script/camd3-help.txt
;;
log)
clear
echo "$CAMNAME Log - Abbrechen mit [Strg]+[C] $(date +"%d.%m.%Y %H:%M")"
echo "==============================================================================="
echo ""
if [ -f $CDLOG ] ; then
tail -f $CDLOG
else
echo "Keine Logdatei vorhanden!"
fi
;;
*)
clear
echo -e "\033[1;37m$CAMNAME-Server IPC $IPCVERSION $(date +"%d.%m.%Y %H:%M")\033[0m"
echo "==============================================================================="
echo ""
echo -e "Befehlsliste: \033[1;31mcamd3\033[0m"
echo ""
echo -e "\033[1;37m Hilfe zu Befehlen\033[0m \033[1;31mhelp\033[0m"
echo -e "\033[1;37m Start, Stop, Restart\033[0m \033[0;37mstart | lstart | stop | restart\033[0m"
echo -e "\033[1;37m Logfile\033[0m \033[0;37mlog\033[0m"
echo ""
echo "==============================================================================="
echo ""
exit 1
;;
esac
exit 0
Zuletzt bearbeitet: