summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <francesco.colista@gmail.com>2011-09-02 06:18:50 +0000
committerFrancesco Colista <francesco.colista@gmail.com>2011-09-02 06:18:50 +0000
commitb554274aacaa228d10f94bd8063a6409828349a4 (patch)
tree33e99e97918c66bddd0218353f8f58c95c53b6b8
parent7e58031bf37922dd40fa8c87dd13b3f64ad36f3f (diff)
downloadaports-b554274aacaa228d10f94bd8063a6409828349a4.tar.bz2
aports-b554274aacaa228d10f94bd8063a6409828349a4.tar.xz
testing/openvcp: fixed initd stop() function
-rw-r--r--testing/openvcp/APKBUILD13
-rw-r--r--testing/openvcp/openvcp.initd17
2 files changed, 15 insertions, 15 deletions
diff --git a/testing/openvcp/APKBUILD b/testing/openvcp/APKBUILD
index f1703ccc7..917ab85e6 100644
--- a/testing/openvcp/APKBUILD
+++ b/testing/openvcp/APKBUILD
@@ -4,15 +4,14 @@ pkgname=openvcp
_pkgname=openvcpd
pkgver=0.5
_pkgver=0.5rc3
-pkgrel=2
+pkgrel=3
pkgdesc="Control Panel for VServer instances"
url="http://www.openvcp.org"
arch="all"
license="GPL"
depends=
-depends_dev=
-makedepends="gnutls-dev util-vserver-dev libxml2-dev libpcap-dev libtool
- sqlite-dev rsync iptables-dev"
+depends_dev="gnutls-dev util-vserver-dev libxml2-dev libpcap-dev libtool sqlite-dev rsync iptables-dev"
+makedepends="$depends_dev"
install=
subpackages=
source="http://files.openvcp.org/$_pkgname-$_pkgver.tar.gz
@@ -20,7 +19,6 @@ source="http://files.openvcp.org/$_pkgname-$_pkgver.tar.gz
$pkgname.initd"
_builddir="$srcdir"/$_pkgname-$_pkgver
-
prepare() {
cd "$_builddir"
for i in $source; do
@@ -39,10 +37,13 @@ build() {
}
package() {
cd "$_builddir"
+ mkdir -p "$pkgdir"/vservers/backups
+ mkdir -p "$pkgdir"/vservers/userbackups
+ mkdir -p "$pkgdir"/vservers/images
make DESTDIR="$pkgdir" install || return 1
install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
}
md5sums="9c65d706133ea48553c90236997f1b8b openvcpd-0.5rc3.tar.gz
bf034b4507f79f635596f1c78f5f7e3f system-libiptc.patch
-db8efb9c086673fd2e3e2532294c7a2f openvcp.initd"
+1456fa83d29c27588dc3df6f3ea22cc7 openvcp.initd"
diff --git a/testing/openvcp/openvcp.initd b/testing/openvcp/openvcp.initd
index 9acc4d109..9e9f92b3e 100644
--- a/testing/openvcp/openvcp.initd
+++ b/testing/openvcp/openvcp.initd
@@ -1,21 +1,20 @@
#!/sbin/runscript
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="openvcpd"
-NAME=openvcpd
-DAEMON=/usr/bin/$NAME
-DAEMON_ARGS=""
-PIDFILE=/var/run/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
+depend () {
+ use net
+ after firewall
+}
start() {
ebegin "OpenVCP Starting"
- start-stop-daemon --start --quiet --background --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 1
+ start-stop-daemon --start --quiet --background --exec /bin/openvcpd -- --pidfile /var/run/openvcpd.pid || return 1
eend $?
}
stop() {
ebegin "OpenVCP Stopping"
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+ kpid=`cat /var/run/openvcpd.pid`
+ kill -kill `expr $kpid - 1`
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile /var/run/openvcpd.pid
eend $?
}