| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python2.7/dist-packages/twisted/scripts/ |
Upload File : |
oUNc @ s d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m
Z
m Z d Z d Z
d e
j f d YZ i d d 6d
d
6d d 6d d 6Z d
Z d Z d d Z d S( iN( t StringIO( t usaget logs #!/bin/sh
#
# Startup script for a Twisted service.
#
# chkconfig: - 85 15
# description: Start-up script for the Twisted service "%(tap_file)s".
PATH=/usr/bin:/bin:/usr/sbin:/sbin
pidfile=/var/run/%(rpm_file)s.pid
rundir=/var/lib/twisted-taps/%(rpm_file)s/
file=/etc/twisted-taps/%(tap_file)s
logfile=/var/log/%(rpm_file)s.log
# load init function library
. /etc/init.d/functions
[ -r /etc/default/%(rpm_file)s ] && . /etc/default/%(rpm_file)s
# check for required files
if [ ! -x /usr/bin/twistd ]
then
echo "$0: Aborting, no /usr/bin/twistd found"
exit 0
fi
if [ ! -r "$file" ]
then
echo "$0: Aborting, no file $file found."
exit 0
fi
# set up run directory if necessary
if [ ! -d "${rundir}" ]
then
mkdir -p "${rundir}"
fi
case "$1" in
start)
echo -n "Starting %(rpm_file)s: twistd"
daemon twistd \
--pidfile=$pidfile \
--rundir=$rundir \
--%(twistd_option)s=$file \
--logfile=$logfile
status %(rpm_file)s
;;
stop)
echo -n "Stopping %(rpm_file)s: twistd"
kill `cat "${pidfile}"`
status %(rpm_file)s
;;
restart)
"${0}" stop
"${0}" start
;;
*)
echo "Usage: ${0} {start|stop|restart|}" >&2
exit 1
;;
esac
exit 0
s Summary: %(description)s
Name: %(rpm_file)s
Version: %(version)s
Release: 1
License: Unknown
Group: Networking/Daemons
Source: %(tarfile_basename)s
BuildRoot: %%{_tmppath}/%%{name}-%%{version}-root
Requires: /usr/bin/twistd
BuildArch: noarch
%%description
%(long_description)s
%%prep
%%setup
%%build
%%install
[ ! -z "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != '/' ] && rm -rf "$RPM_BUILD_ROOT"
mkdir -p "$RPM_BUILD_ROOT"/etc/twisted-taps
mkdir -p "$RPM_BUILD_ROOT"/etc/init.d
mkdir -p "$RPM_BUILD_ROOT"/var/lib/twisted-taps
cp "%(tap_file)s" "$RPM_BUILD_ROOT"/etc/twisted-taps/
cp "%(rpm_file)s.init" "$RPM_BUILD_ROOT"/etc/init.d/"%(rpm_file)s"
%%clean
[ ! -z "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != '/' ] && rm -rf "$RPM_BUILD_ROOT"
%%post
/sbin/chkconfig --add %(rpm_file)s
/sbin/chkconfig --level 35 %(rpm_file)s
/etc/init.d/%(rpm_file)s start
%%preun
/etc/init.d/%(rpm_file)s stop
/sbin/chkconfig --del %(rpm_file)s
%%files
%%defattr(-,root,root)
%%attr(0755,root,root) /etc/init.d/%(rpm_file)s
%%attr(0660,root,root) /etc/twisted-taps/%(tap_file)s
%%changelog
* %(date)s %(maintainer)s
- Created by tap2rpm: %(rpm_file)s (%(version)s)
t MyOptionsc B s e Z d d g d d g g Z d d d g d d d g d
d d g d d
d g d d d g d d d g d d d g d d d d g g Z e j d i e j d d d d g d 6e j d d 6 Z d Z
RS(! t unsignedt ut quiett qt tapfilet ts
twistd.tapt
maintainert mt tap2rpmt protocolt pt descriptiont et long_descriptiont ls Automatically created by tap2rpms set-versiont Vs 1.0t rpmfilet rt typet yt taps8 type of configuration: 'tap', 'xml, 'source' or 'python't
optActionst xmlt sourcet pythons *.rpmc C s | d d
k rC t j j | d } t j j | d | d <n | d d
k rk d | d f | d <n | d d
k r d | d f | d <n t | d | d <d
| d | d f | d <d
S( sP
Calculate the default values for certain command-line options.
R
R i R s A TCP server for %sR s
twisted-%sR t
twistd_options %s-%ss set-versions release-nameN( t Nonet ost patht basenamet splitextt type_dict( t selft base_tapfile( ( s; /usr/lib/python2.7/dist-packages/twisted/scripts/tap2rpm.pyt postOptions s N( t __name__t
__module__t optFlagsR t
optParametersR t Completionst CompleteListt
CompleteFilest compDataR&