diff options
author | yjun123 | 2020-08-14 21:06:29 +0800 |
---|---|---|
committer | yjun123 | 2020-08-14 21:06:29 +0800 |
commit | e5d00aa24dfa8c97c269fe512eb97caac95da4d6 (patch) | |
tree | 8d61d0142785a6c4e9f8316e07279f6f5c553746 | |
parent | eb73551f053f5802c291b35ad6394fb565aa7a29 (diff) | |
download | aur-e5d00aa24dfa8c97c269fe512eb97caac95da4d6.tar.gz |
[Upgrade] 5.0.0
-rw-r--r-- | .INSTALL | 63 | ||||
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 53 |
3 files changed, 59 insertions, 71 deletions
@@ -1,37 +1,46 @@ post_install() { - ECHOLEN=$(echo -e|awk '{print length($0)}') - if [ ${ECHOLEN} = '0' ] - then - ECHO='echo -e' - else - ECHO='echo' - fi + systemctl daemon-reload + systemctl enable phtunnel.service + systemctl start phtunnel.service + + snbuf=$(wget 127.0.0.1:16062/ora_service/getsn -T 3 -q -O - 2>/dev/null) + SN=`echo -e $snbuf | grep -oE '"device_sn":"[^\"]+' | cut -d ":" -f 2 | sed 's/\"//g'` - $ECHO "" - $ECHO " \033[32m+------------------------------------------------------+\033[0m" - $ECHO " \033[32m| phddns start(启动)| stop(停止) |\033[0m" - $ECHO " \033[32m| status(状态 | restart(重启)|version(版本)|\033[0m" - $ECHO " \033[32m| version(版本) |\033[0m" - $ECHO " \033[32m+------------------------------------------------------+\033[0m" + echo -e "\033[1;31mSuccessful installation of Phddns Service.\033[0m" + sleep 2 + if [ `systemctl is-active phtunnel.service` == 'active' ]; then + echo -e "" + echo -e " \033[32m+--------------------------------------------------+\033[0m" + echo -e " \033[32m| Oray Phtunnel Linux 5.0.0 |\033[0m" + echo -e " \033[32m+--------------------------------------------------+\033[0m" + echo -e " \033[32m| SN: $SN Default password: admin |\033[0m" + echo -e " \033[32m+--------------------------------------------------+\033[0m" + echo -e " \033[32m| Remote Management Address http://b.oray.com |\033[0m" + echo -e " \033[32m+--------------------------------------------------+\033[0m" + fi } post_upgrade() { - ECHOLEN=$(echo -e|awk '{print length($0)}') - if [ ${ECHOLEN} = '0' ] - then - ECHO='echo -e' - else - ECHO='echo' - fi + systemctl daemon-reload + systemctl enable phtunnel.service + systemctl start phtunnel.service + + snbuf=$(wget 127.0.0.1:16062/ora_service/getsn -T 3 -q -O - 2>/dev/null) + SN=`echo -e $snbuf | grep -oE '"device_sn":"[^\"]+' | cut -d ":" -f 2 | sed 's/\"//g'` - $ECHO "" - $ECHO " \033[32m+------------------------------------------------------+\033[0m" - $ECHO " \033[32m| phddns start(启动)| stop(停止) |\033[0m" - $ECHO " \033[32m| status(状态 | restart(重启)|version(版本)|\033[0m" - $ECHO " \033[32m| version(版本) |\033[0m" - $ECHO " \033[32m+------------------------------------------------------+\033[0m" + echo -e "\033[1;31mSuccessful installation of Phddns Service.\033[0m" + sleep 2 + if [ `systemctl is-active phtunnel.service` == 'active' ]; then + echo -e "" + echo -e " \033[32m+--------------------------------------------------+\033[0m" + echo -e " \033[32m| Oray Phtunnel Linux 5.0.0 |\033[0m" + echo -e " \033[32m+--------------------------------------------------+\033[0m" + echo -e " \033[32m| SN: $SN Default password: admin |\033[0m" + echo -e " \033[32m+--------------------------------------------------+\033[0m" + echo -e " \033[32m| Remote Management Address http://b.oray.com |\033[0m" + echo -e " \033[32m+--------------------------------------------------+\033[0m" + fi } - # vim : set sw=2 ts=2 et: @@ -1,16 +1,18 @@ pkgbase = phddns-bin pkgdesc = Peanut shell is a dynamic DNS software, any place, any time, any lines, all can through fixed domain access to the remote host services - pkgver = 3.0.4 - pkgrel = 2 + pkgver = 5.0.0 + pkgrel = 1 url = https://hsk.oray.com/download/ install = .INSTALL - arch = armv7h + arch = x86_64 + arch = i686 license = custom - options = !strip source = LICENSE::https://service.oray.com/question/1820.html sha256sums = SKIP - source_armv7h = http://download.oray.com/peanuthull/embed/phddns_3.0.4_systemd.deb - sha256sums_armv7h = d8fb134ecb61058e2e1a243755bfae656eaf1e0deaec6e8070a99d26c253265f + source_x86_64 = http://dl-cdn.oray.com/hsk/linux/phddns-5.0.0-amd64.deb + sha256sums_x86_64 = f27b86a13684212b9e852a6ac20256d9fadf7ca3a402d4f4c5d70530dffd1c1c + source_i686 = http://dl-cdn.oray.com/hsk/linux/phddns-5.0.0-i386.deb + sha256sums_i686 = 882aaca32b86d1beb3d0daf3f3bce35ff1eb7500729a3cec48ee3427fb2e8b7b pkgname = phddns-bin @@ -2,56 +2,33 @@ pkgname=phddns-bin _pkgname=${pkgname%-bin} -pkgver=3.0.4 -pkgrel=2 +pkgver=5.0.0 +pkgrel=1 pkgdesc="Peanut shell is a dynamic DNS software, any place, any time, any lines, all can through fixed domain access to the remote host services" -arch=("armv7h") +arch=("x86_64" "i686") url="https://hsk.oray.com/download/" license=('custom') -options=('!strip') install='.INSTALL' source=('LICENSE::https://service.oray.com/question/1820.html') -source_armv7h=("http://download.oray.com/peanuthull/embed/${_pkgname}_${pkgver}_systemd.deb") +source_x86_64=("http://dl-cdn.oray.com/hsk/linux/${_pkgname}-${pkgver}-amd64.deb") +source_i686=("http://dl-cdn.oray.com/hsk/linux/${_pkgname}-${pkgver}-i386.deb") sha256sums=('SKIP') -sha256sums_armv7h=('d8fb134ecb61058e2e1a243755bfae656eaf1e0deaec6e8070a99d26c253265f') +sha256sums_x86_64=('f27b86a13684212b9e852a6ac20256d9fadf7ca3a402d4f4c5d70530dffd1c1c') +sha256sums_i686=('882aaca32b86d1beb3d0daf3f3bce35ff1eb7500729a3cec48ee3427fb2e8b7b') package() { - tar -xf data.tar.xz -C ${pkgdir} - - # systemd service - cd ${pkgdir} - for service in lib/systemd/system/*; - do - install -Dm644 $service usr/$service - done - rm -rf lib - - sed -i 's|/usr/orayapp/|/usr/bin/|g' usr/lib/systemd/system/* - sed -i 's|/bin/rm|/usr/bin/rm -fr|g' usr/lib/systemd/system/* - sed -i 's|/usr/orayapp|/usr/share/pgyvpn|g' usr/lib/systemd/system/phddns_sl.service + install -dm755 ${srcdir}/${pkgname} + tar -xf data.tar.xz -C ${srcdir}/${pkgname} # binary - install -Dm755 usr/sbin/phddns usr/bin/phddns - install -Dm755 usr/orayapp/oraynewph usr/bin/oraynewph - install -Dm755 usr/orayapp/oraysl usr/bin/oraysl - rm -rf usr/orayapp/oray* - rm -rf usr/sbin - - # scripts - for scripts in usr/orayapp/*; - do - install -Dm755 $scripts usr/share/${_pkgname}/`basename $scripts` - done - rm -rf usr/orayapp - - # permisson fixed - chmod 755 usr - chown root:root usr - + install -Dm755 -t ${pkgdir}/usr/bin/ ${srcdir}/${pkgname}/usr/bin/phtunnel + + # systemd service + install -Dm644 -t ${pkgdir}/usr/lib/systemd/system/ ${srcdir}/${pkgname}/tmp/pht_script/phtunnel.service + # license - install -Dm644 ${srcdir}/LICENSE usr/share/licenses/${pkgname}/LICENSE + install -Dm644 -t ${pkgdir}/usr/share/licenses/${pkgname}/ ${srcdir}/LICENSE } - # vim: ts=2 sw=2 et: |