mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
aur/couchpotato-git to 2358.324415b-1 + cleanup
This commit is contained in:
parent
efc77a7d37
commit
dc6edadbeb
5 changed files with 2 additions and 74 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
pkgname=couchpotato-git
|
||||
_gitname=CouchPotatoServer
|
||||
pkgver=f1dde5c
|
||||
pkgver=2358.324415b
|
||||
pkgrel=1
|
||||
pkgdesc="Automatic Movie Downloading via NZBs & Torrent"
|
||||
arch=('any')
|
||||
|
@ -16,7 +16,7 @@ md5sums=('SKIP' '82813cd00a17dd78f10756d71c7eb848')
|
|||
|
||||
pkgver() {
|
||||
cd $_gitname
|
||||
git describe --always | sed 's|-|.|g'
|
||||
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
|
||||
}
|
||||
|
||||
package() {
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
python2 /opt/couchpotato/CouchPotato.py "$@"
|
|
@ -1,25 +0,0 @@
|
|||
# Make sure we don't run as 0077 or similar
|
||||
#
|
||||
# Useful if running as another user that needs access to files
|
||||
umask 0022
|
||||
|
||||
# Misc options, these aren't necessary but useful
|
||||
#
|
||||
# Can be commented out / modified
|
||||
CP_OPTS="--daemon --quiet"
|
||||
|
||||
#
|
||||
# The following below MUST be set
|
||||
#
|
||||
|
||||
# User to run process as
|
||||
CP_USER="couchpotato"
|
||||
|
||||
# Config file to use
|
||||
CP_CONFIG="/opt/couchpotato/config.ini"
|
||||
|
||||
# Port to listen on, only used for shutdown!
|
||||
CP_PORT="5050"
|
||||
|
||||
# Where CouchPotato stores its info
|
||||
CP_DATA="/opt/couchpotato/data"
|
|
@ -1,43 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
. /etc/conf.d/couchpotato
|
||||
|
||||
PID=`ps -A -F | grep "python2 /opt/couchpotato/CouchPotato.py" | grep -v grep | awk '{print $2}'`
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Starting CouchPotato"
|
||||
if [ -z "$CP_USER" ]; then
|
||||
stat_busy "No CP_USER, please edit /etc/conf.d/couchpotato"
|
||||
stat_fail
|
||||
else
|
||||
[ -z "$PID" ] && su -l -s /bin/sh -c "python2 /opt/couchpotato/CouchPotato.py ${CP_OPTS} --config_file ${CP_CONFIG} --data_dir ${CP_DATA} &> /dev/null &" "$CP_USER"
|
||||
if [ $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
add_daemon couchpotato
|
||||
stat_done
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
stat_busy "Stopping CouchPotato"
|
||||
[ ! -z "$PID" ] && kill $PID &> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
rm_daemon couchpotato
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
while [ ! -z "$PID" -a -d "/proc/$PID" ]; do sleep 1; done
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
esac
|
||||
exit 0
|
|
@ -1 +0,0 @@
|
|||
CP_OPTS=--config_file /opt/couchpotato/config.ini --data_dir /opt/couchpotato/data --daemon --quiet
|
Loading…
Reference in a new issue