Re:MMDVM, DVMega 구동용 라즈베리파이 이미지 제작 과정 DV (DMR,DSTAR and Fusion)

http://sojubox.com/3563575

위의 이미지에 YSFGateway 추가 설치 방법입니다.
진행중 메모이니, 글로 정리 한 뒤, 이미지에 합쳐서
이미지 업데이트 하도록 하겠습니다.


sudo groupadd mmdvm
sudo useradd mmdvm -g mmdvm -s /sbin/nologin
sudo apt-get install sysv-rc-conf
git clone https://github.com/g4klx/YSFClients.git
cd /home/pi/YSFClients/YSFGateway
make clean all
sudo mkdir -p /opt/YSFGateway
sudo mksir -p /var/log/YSFGateway
sudo cp /home/pi/YSFClients/YSFGateway/YSFGateway /opt/YSFGateway
sudo cp /home/pi/YSFClients/YSFGateway/YSFGateway.ini /etc
sudo /usr/bin/wget -O /etc/YSFHosts.txt https://register.ysfreflector.de/export_csv.php

sudo crontab -e
----------------------------------------------
0 * * * * /usr/bin/wget -O /etc/YSFHosts.txt https://register.ysfreflector.de/export_csv.php
----------------------------------------------


sudo vi /etc/YSFGateway.ini
----------------------------------------------
[General]
Callsign=HL2UVH
#Suffix=RPT
Suffix=ND
RptAddress=127.0.0.1
RptPort=3200
LocalAddress=127.0.0.1
LocalPort=4200
Daemon=1

[Info]
RXFrequency=430300000
TXFrequency=430300000
Power=1
Latitude=0.0
Longitude=0.0
Height=0
Name=Nowhere
Description=Multi-Mode Repeater

[Log]
# Logging levels, 0=No logging
DisplayLevel=0
FileLevel=2
FilePath=/var/log/YSFGateway
FileRoot=YSFGateway

[aprs.fi]
Enable=0
# Server=noam.aprs2.net
Server=euro.aprs2.net
Port=14580
Password=9999

[Network]
Enable=1
DataPort=42000
Hosts=/etc/YSFHosts.txt
ReloadTime=60
ParrotAddress=127.0.0.1
ParrotPort=42000
Startup=38206
Debug=0
----------------------------------------------




sudo vi /etc/init.d/YSFGateway
----------------------------------------------
#!/bin/sh
### BEGIN INIT INFO
#
# Provides: YSFGateway
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: YSFGateway Start Script
#
### END INIT INFO

PROG="YSFGateway"
PROG_PATH="/opt/YSFGateway/"
PROG_ARGS="/etc/YSFGateway.ini"
PIDFILE="/var/run/YSFGateway.pid"
USER="root"

start() {
if [ -e $PIDFILE ]; then
## Program is running, exit with error.
echo "Error! $PROG is currently running!" 1>&2
exit 1
else
echo "Starting $PROG ..."
eval‎ "${PROG_PATH}${PROG} ${PROG_ARGS}"
echo "$PROG started."
touch $PIDFILE
fi
}

stop() {
if [ -e $PIDFILE ]; then
echo "Stopping $PROG ..."
rm -f ${PIDFILE}
PID=`ps -ef | grep ${PROG_PATH}${PROG} | grep -v grep | awk '{print \$2}'`
kill -9 ${PID}
echo "${PROG} is stopped."
else
## Program is not running, exit with error.
echo "Error! $PROG not started!" 1>&2
exit 1
fi
}

## Check to see if we are running as root first.
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi

case "$1" in
start)
start
exit 0
;;
stop)
stop
exit 0
;;
restart)
stop
sleep 5
start
exit 0
;;
**)
echo "Usage: $0 {start|stop|restart}" 1>&2
exit 1
;;
esac
exit 0
### END
----------------------------------------------

sudo chmod +x /etc/init.d/YSFGateway
cd /etc/init.d/
sudo sysv-rc-conf YSFGateway on



sudo vi remove_old_log.sh
----------------------------------------------
# 아래줄 추가
find /var/log/YSFGateway -name 'YSFGateway-*' -mtime +5 | sudo xargs rm -f
----------------------------------------------

덧글

댓글 입력 영역

Google Adsense


BASICOMM

>> BASICOMM 대한민국
50MHz안테나, 발룬, GHD Japan CW키, 페라이트 코어, 무선통신장비 수입대행
>> BASICOMM Worldwide
BASICOMM High Power Balun

Grid Locator of HL2UVH

Long : 127.14662 E (127° 8' 48'' E)
Lat : 37.60101 N (37° 36' 4'' N)
QTH locator : PM37no

Solar-Terrestrial Data

GoogleAnalytics