summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlisuke2018-02-26 17:59:48 +0800
committerlisuke2018-02-26 17:59:48 +0800
commit3124f7795c6c5131de8d88c549d9167f59cdd2b8 (patch)
treec2c4e98b56afc17bcae674c6a5164aebe9476bb9
parent3b41a1c4a60fe674fe4435210562304cc507b5fb (diff)
downloadaur-3124f7795c6c5131de8d88c549d9167f59cdd2b8.tar.gz
fix sysctl disable_ipv6 bug, add supervisor configure file -> miredo.ini , call restart_miredo script
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD18
-rw-r--r--miredo.ini14
-rw-r--r--restart_miredo3
4 files changed, 38 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ac1a3fdb9f1..743c3653c39 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,11 @@
pkgbase = miredo-debian
- pkgdesc = miredo, miredo.deb
+ pkgdesc = miredo, miredo.deb, only support armv7h
pkgver = 1.2.6
pkgrel = 2
url = https://packages.debian.org/jessie/miredo
arch = armv7h
license = unknown
+ checkdepends = supervisor
makedepends = tar
depends = libjudydebian1
depends = iproute2
@@ -14,9 +15,13 @@ pkgbase = miredo-debian
source = http://ftp.cn.debian.org/debian/pool/main/m/miredo/miredo_1.2.6-2_armhf.deb
source = miredo.service
source = 50-miredo.conf
+ source = restart_miredo
+ source = miredo.ini
md5sums = 4680e1bf2fa322d442be326f94490114
md5sums = eccff5befe0e71875c3429e71b81bcda
md5sums = 44fad4f428c85b64a9c46c93ec76079f
+ md5sums = 213905764b73be9203724d19a78792cf
+ md5sums = 59717fe16bde9cb80669bf477d7aa0c3
pkgname = miredo-debian
diff --git a/PKGBUILD b/PKGBUILD
index 8db14c018ad..691f0cff3ef 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ pkgname=miredo-debian
pkgver=1.2.6
pkgrel=2
-pkgdesc="miredo, miredo.deb"
+pkgdesc="miredo, miredo.deb, only support armv7h"
arch=('armv7h')
conflicts=('miredo')
url="https://packages.debian.org/jessie/miredo"
@@ -12,18 +12,22 @@ license=('unknown')
options=('!strip')
depends=('libjudydebian1' 'iproute2' 'libcap')
makedepends=('tar')
-checkdepends=()
+checkdepends=('supervisor')
source=(
"http://ftp.cn.debian.org/debian/pool/main/m/miredo/miredo_${pkgver}-2_armhf.deb"
"miredo.service"
"50-miredo.conf"
+ "restart_miredo"
+ "miredo.ini"
)
noextract=()
md5sums=(
'4680e1bf2fa322d442be326f94490114'
"eccff5befe0e71875c3429e71b81bcda"
"44fad4f428c85b64a9c46c93ec76079f"
+ "213905764b73be9203724d19a78792cf"
+ "59717fe16bde9cb80669bf477d7aa0c3"
)
validpgpkeys=()
@@ -40,8 +44,9 @@ package() {
install -D -m755 etc/miredo/client-hook ${pkgdir}/etc/miredo/client-hook || return 1
install -D -m644 etc/miredo/miredo.conf ${pkgdir}/etc/miredo/miredo.conf || return 1
install -D -m755 etc/network/if-up.d/miredo ${pkgdir}/etc/network/if-up.d/miredo || return 1
- install -D -m644 miredo.service ${pkgdir}/usr/lib/systemd/system/miredo.service || return 1
install -D -m644 50-miredo.conf ${pkgdir}/etc/sysctl.d/50-miredo.conf || return 1
+ install -D -m644 miredo.ini ${pkgdir}/etc/supervisor.d/miredo.ini || return 1
+ install -D -m755 restart_miredo ${pkgdir}/etc/miredo/restart_miredo || return 1
#/usr
##lib
@@ -52,6 +57,9 @@ package() {
install -D -m755 usr/lib/arm-linux-gnueabihf/miredo/miredo-privproc ${pkgdir}/usr/lib/arm-linux-gnueabihf/miredo/miredo-privproc || return 1
install -D -m755 usr/sbin/miredo ${pkgdir}/usr/bin/miredo || return 1
install -D -m755 usr/sbin/miredo-checkconf ${pkgdir}/usr/bin/miredo-checkconf || return 1
+
+ ##systemd
+ install -D -m644 miredo.service ${pkgdir}/usr/lib/systemd/system/miredo.service || return 1
##doc
install -D -m644 usr/share/doc/miredo/AUTHORS ${pkgdir}/usr/share/doc/miredo/AUTHORS || return 1
@@ -69,5 +77,9 @@ package() {
install -D -m644 usr/share/locale/en_GB/LC_MESSAGES/miredo.mo ${pkgdir}/usr/share/locale/en_GB/LC_MESSAGES/miredo.mo || return 1
install -D -m644 usr/share/locale/fr/LC_MESSAGES/miredo.mo ${pkgdir}/usr/share/locale/fr/LC_MESSAGES/miredo.mo || return 1
install -D -m644 usr/share/locale/zh_CN/LC_MESSAGES/miredo.mo ${pkgdir}/usr/share/locale/zh_CN/LC_MESSAGES/miredo.mo || return 1
+
+ ##supervisor log
+ touch empty_file || return 1
+ install -D -m644 empty_file ${pkgdir}/var/log/supervisor/miredo_stdout.log || return 1
}
diff --git a/miredo.ini b/miredo.ini
new file mode 100644
index 00000000000..67c9adf67a7
--- /dev/null
+++ b/miredo.ini
@@ -0,0 +1,14 @@
+[program:miredo]
+
+directory = /etc/miredo/ ;程序的启动目录
+command = /etc/miredo/restart_miredo
+autostart = false
+startsecs = 10
+autorestart = true
+startretries = 3
+user = root
+redirect_stderr = true ;把 stderr 重定向到 stdout,默认 false
+stdout_logfile_maxbytes = 20MB ;stdout 日志文件大小,默认 50MB
+stdout_logfile_backups = 20 ;stdout 日志文件备份数
+stdout_logfile = /var/log/supervisor/miredo_stdout.log
+; stdout 日志文件,需要注意当指定目录不存在时无法正常启动,所以需要手动创建目录(supervisord 会自动创建日志文件) \ No newline at end of file
diff --git a/restart_miredo b/restart_miredo
new file mode 100644
index 00000000000..0c172383596
--- /dev/null
+++ b/restart_miredo
@@ -0,0 +1,3 @@
+#!/bin/bash
+/usr/bin/sysctl -p /etc/sysctl.d/50-miredo.conf
+systemctl restart miredo