提交 a4f0692e 编写于 作者: R Robert Metzger

[FLINK-3286] Remove the files from the debian packaging as well

上级 9ee16794
#! /bin/sh
################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################
#
# skeleton example file to build /etc/init.d/ scripts.
# This file should be used to construct scripts for /etc/init.d.
#
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified for Debian
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Further changes by Javier Fernandez-Sanguino <jfs@debian.org>
#
# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
#
# Starts a flink jobmanager
#
# chkconfig: 2345 85 15
# description: flink jobmanager
#
### BEGIN INIT INFO
# Provides: flink-jobmanager
# Required-Start: $network $local_fs
# Required-Stop:
# Should-Start: $named
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: flink jobmanager daemon
### END INIT INFO
# Include flink defaults if available
if [ -f /etc/default/flink ] ; then
. /etc/default/flink
fi
if [ "$FLINK_PID_DIR" = "" ]; then
FLINK_PID_DIR=/tmp
fi
if [ "$FLINK_IDENT_STRING" = "" ]; then
FLINK_IDENT_STRING="$USER"
fi
FLINK_HOME=/usr/share/flink-dist
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON_SCRIPT=$FLINK_HOME/bin/jobmanager.sh
NAME=flink-jobmanager
DESC="flink jobmanager daemon"
PID_FILE=$FLINK_PID_DIR/flink-$FLINK_IDENT_STRING-jobmanager.pid
test -x $DAEMON_SCRIPT || exit 1
DODTIME=5 # Time to wait for the server to die, in seconds
# If this value is set too low you might not
# let some servers to die gracefully and
# 'restart' will not work
# Checks if the given pid represents a live process.
# Returns 0 if the pid is a live process, 1 otherwise
flink_is_process_alive() {
local pid="$1"
ps -fp $pid | grep $pid | grep jobmanager > /dev/null 2>&1
}
# Check if the process associated to a pidfile is running.
# Return 0 if the pidfile exists and the process is running, 1 otherwise
flink_check_pidfile() {
local pidfile="$1" # IN
local pid
pid=`cat "$pidfile" 2>/dev/null`
if [ "$pid" = '' ]; then
# The file probably does not exist or is empty.
return 1
fi
set -- $pid
pid="$1"
flink_is_process_alive $pid
}
flink_process_kill() {
local pid="$1" # IN
local signal="$2" # IN
local second
kill -$signal $pid 2>/dev/null
# Wait a bit to see if the dirty job has really been done
for second in 0 1 2 3 4 5 6 7 8 9 10; do
if flink_is_process_alive "$pid"; then
# Success
return 0
fi
sleep 1
done
# Timeout
return 1
}
# Kill the process associated to a pidfile
flink_stop_pidfile() {
local pidfile="$1" # IN
local pid
pid=`cat "$pidfile" 2>/dev/null`
if [ "$pid" = '' ]; then
# The file probably does not exist or is empty. Success
return 0
fi
set -- $pid
pid="$1"
# First try the easy way
if flink_process_kill "$pid" 15; then
return 0
fi
# Otherwise try the hard way
if flink_process_kill "$pid" 9; then
return 0
fi
return 1
}
start() {
$FLINK_HOME/bin/jobmanager.sh start cluster
}
stop() {
$FLINK_HOME/bin/jobmanager.sh stop
}
check_for_root() {
if [ $(id -ur) -ne 0 ]; then
echo 'Error: root user required'
echo
exit 1
fi
}
flink_service() {
case "$1" in
start)
check_for_root
echo -n "Starting $DESC: "
start
if flink_check_pidfile $PID_FILE ; then
echo "$NAME."
else
echo "ERROR. Could not start $DESC"
exit 1
fi
;;
stop)
check_for_root
echo -n "Stopping $DESC: "
stop
[ -n "$DODTIME" ] && sleep $DODTIME
if flink_check_pidfile $PID_FILE ; then
echo "ERROR. Could not stop $DESC"
exit 1
else
echo "$NAME."
fi
;;
force-stop)
check_for_root
echo -n "Forcefully stopping $DESC: "
flink_stop_pidfile $PID_FILE
[ -n "$DODTIME" ] && sleep $DODTIME
if ! flink_check_pidfile $PID_FILE ; then
echo "$NAME."
else
echo "ERROR. Could not force stop $DESC"
exit 1
fi
;;
force-reload)
check_for_root
echo -n "Forcefully reloading $DESC: "
flink_check_pidfile $PID_FILE && $0 restart
;;
restart)
check_for_root
echo -n "Restarting $DESC: "
stop
[ -n "$DODTIME" ] && sleep $DODTIME
$0 start
;;
status)
echo -n "$NAME is "
if flink_check_pidfile $PID_FILE ; then
echo "running"
else
echo "not running."
exit 1
fi
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2
exit 1
;;
esac
}
flink_service "$1"
exit 0
#! /bin/sh
################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################
#
# skeleton example file to build /etc/init.d/ scripts.
# This file should be used to construct scripts for /etc/init.d.
#
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified for Debian
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Further changes by Javier Fernandez-Sanguino <jfs@debian.org>
#
# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
#
# Starts a flink taskmanager
#
# chkconfig: 2345 85 15
# description: flink taskmanager
#
### BEGIN INIT INFO
# Provides: flink-taskmanager
# Required-Start: $network $local_fs
# Required-Stop:
# Should-Start: $named
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: flink taskmanager daemon
### END INIT INFO
# Include hadoop defaults if available
if [ -f /etc/default/flink ] ; then
. /etc/default/flink
fi
if [ "$FLINK_PID_DIR" = "" ]; then
FLINK_PID_DIR=/tmp
fi
if [ "$FLINK_IDENT_STRING" = "" ]; then
FLINK_IDENT_STRING="$USER"
fi
FLINK_HOME=/usr/share/flink-dist
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON_SCRIPT=$FLINK_HOME/bin/taskmanager.sh
NAME=flink-taskmanager
DESC="flink taskmanager daemon"
PID_FILE=$FLINK_PID_DIR/flink-$FLINK_IDENT_STRING-taskmanager.pid
test -x $DAEMON_SCRIPT || exit 1
DODTIME=5 # Time to wait for the server to die, in seconds
# If this value is set too low you might not
# let some servers to die gracefully and
# 'restart' will not work
# Checks if the given pid represents a live process.
# Returns 0 if the pid is a live process, 1 otherwise
flink_is_process_alive() {
local pid="$1"
ps -fp $pid | grep $pid | grep taskmanager > /dev/null 2>&1
}
# Check if the process associated to a pidfile is running.
# Return 0 if the pidfile exists and the process is running, 1 otherwise
flink_check_pidfile() {
local pidfile="$1" # IN
local pid
pid=`cat "$pidfile" 2>/dev/null`
if [ "$pid" = '' ]; then
# The file probably does not exist or is empty.
return 1
fi
set -- $pid
pid="$1"
flink_is_process_alive $pid
}
flink_process_kill() {
local pid="$1" # IN
local signal="$2" # IN
local second
kill -$signal $pid 2>/dev/null
# Wait a bit to see if the dirty job has really been done
for second in 0 1 2 3 4 5 6 7 8 9 10; do
if flink_is_process_alive "$pid"; then
# Success
return 0
fi
sleep 1
done
# Timeout
return 1
}
# Kill the process associated to a pidfile
flink_stop_pidfile() {
local pidfile="$1" # IN
local pid
pid=`cat "$pidfile" 2>/dev/null`
if [ "$pid" = '' ]; then
# The file probably does not exist or is empty. Success
return 0
fi
set -- $pid
pid="$1"
# First try the easy way
if flink_process_kill "$pid" 15; then
return 0
fi
# Otherwise try the hard way
if flink_process_kill "$pid" 9; then
return 0
fi
return 1
}
start() {
$FLINK_HOME/bin/taskmanager.sh start
}
stop() {
$FLINK_HOME/bin/taskmanager.sh stop
}
check_for_root() {
if [ $(id -ur) -ne 0 ]; then
echo 'Error: root user required'
echo
exit 1
fi
}
flink_service() {
case "$1" in
start)
check_for_root
echo -n "Starting $DESC: "
start
if flink_check_pidfile $PID_FILE ; then
echo "$NAME."
else
echo "ERROR. Could not start $DESC"
exit 1
fi
;;
stop)
check_for_root
echo -n "Stopping $DESC: "
stop
[ -n "$DODTIME" ] && sleep $DODTIME
if flink_check_pidfile $PID_FILE ; then
echo "ERROR. Could not stop $DESC"
exit 1
else
echo "$NAME."
fi
;;
force-stop)
check_for_root
echo -n "Forcefully stopping $DESC: "
flink_stop_pidfile $PID_FILE
[ -n "$DODTIME" ] && sleep $DODTIME
if ! flink_check_pidfile $PID_FILE ; then
echo "$NAME."
else
echo "ERROR. Could not force stop $DESC"
exit 1
fi
;;
force-reload)
check_for_root
echo -n "Forcefully reloading $DESC: "
flink_check_pidfile $PID_FILE && $0 restart
;;
restart)
check_for_root
echo -n "Restarting $DESC: "
stop
[ -n "$DODTIME" ] && sleep $DODTIME
$0 start
;;
status)
echo -n "$NAME is "
if flink_check_pidfile $PID_FILE ; then
echo "running"
else
echo "not running."
exit 1
fi
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2
exit 1
;;
esac
}
flink_service "$1"
exit 0
#! /bin/sh
################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################
#
# skeleton example file to build /etc/init.d/ scripts.
# This file should be used to construct scripts for /etc/init.d.
#
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified for Debian
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Further changes by Javier Fernandez-Sanguino <jfs@debian.org>
#
# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
#
# Starts the flink webclient
#
# chkconfig: 2345 85 15
# description: flink webclient
#
### BEGIN INIT INFO
# Provides: flink-webclient
# Required-Start: $network $local_fs
# Required-Stop:
# Should-Start: $named
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: flink webclient daemon
### END INIT INFO
# Include hadoop defaults if available
if [ -f /etc/default/flink ] ; then
. /etc/default/flink
fi
if [ "$FLINK_PID_DIR" = "" ]; then
FLINK_PID_DIR=/tmp
fi
if [ "$FLINK_IDENT_STRING" = "" ]; then
FLINK_IDENT_STRING="$USER"
fi
FLINK_HOME=/usr/share/flink-dist
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON_SCRIPT=$FLINK_HOME/bin/webclient.sh
NAME=flink-webclient
DESC="flink webclient daemon"
PID_FILE=$FLINK_PID_DIR/flink-$FLINK_IDENT_STRING-webclient.pid
test -x $DAEMON_SCRIPT || exit 1
DODTIME=5 # Time to wait for the server to die, in seconds
# If this value is set too low you might not
# let some servers to die gracefully and
# 'restart' will not work
# Checks if the given pid represents a live process.
# Returns 0 if the pid is a live process, 1 otherwise
flink_is_process_alive() {
local pid="$1"
ps -fp $pid | grep $pid | grep webclient > /dev/null 2>&1
}
# Check if the process associated to a pidfile is running.
# Return 0 if the pidfile exists and the process is running, 1 otherwise
flink_check_pidfile() {
local pidfile="$1" # IN
local pid
pid=`cat "$pidfile" 2>/dev/null`
if [ "$pid" = '' ]; then
# The file probably does not exist or is empty.
return 1
fi
set -- $pid
pid="$1"
flink_is_process_alive $pid
}
flink_process_kill() {
local pid="$1" # IN
local signal="$2" # IN
local second
kill -$signal $pid 2>/dev/null
# Wait a bit to see if the dirty job has really been done
for second in 0 1 2 3 4 5 6 7 8 9 10; do
if flink_is_process_alive "$pid"; then
# Success
return 0
fi
sleep 1
done
# Timeout
return 1
}
# Kill the process associated to a pidfile
flink_stop_pidfile() {
local pidfile="$1" # IN
local pid
pid=`cat "$pidfile" 2>/dev/null`
if [ "$pid" = '' ]; then
# The file probably does not exist or is empty. Success
return 0
fi
set -- $pid
pid="$1"
# First try the easy way
if flink_process_kill "$pid" 15; then
return 0
fi
# Otherwise try the hard way
if flink_process_kill "$pid" 9; then
return 0
fi
return 1
}
start() {
$FLINK_HOME/bin/webclient.sh start
}
stop() {
$FLINK_HOME/bin/webclient.sh stop
}
check_for_root() {
if [ $(id -ur) -ne 0 ]; then
echo 'Error: root user required'
echo
exit 1
fi
}
flink_service() {
case "$1" in
start)
check_for_root
echo -n "Starting $DESC: "
start
if flink_check_pidfile $PID_FILE ; then
echo "$NAME."
else
echo "ERROR. Could not start $DESC"
exit 1
fi
;;
stop)
check_for_root
echo -n "Stopping $DESC: "
stop
[ -n "$DODTIME" ] && sleep $DODTIME
if flink_check_pidfile $PID_FILE ; then
echo "ERROR. Could not stop $DESC"
exit 1
else
echo "$NAME."
fi
;;
force-stop)
check_for_root
echo -n "Forcefully stopping $DESC: "
flink_stop_pidfile $PID_FILE
[ -n "$DODTIME" ] && sleep $DODTIME
if ! flink_check_pidfile $PID_FILE ; then
echo "$NAME."
else
echo "ERROR. Could not force stop $DESC"
exit 1
fi
;;
force-reload)
check_for_root
echo -n "Forcefully reloading $DESC: "
flink_check_pidfile $PID_FILE && $0 restart
;;
restart)
check_for_root
echo -n "Restarting $DESC: "
stop
[ -n "$DODTIME" ] && sleep $DODTIME
$0 start
;;
status)
echo -n "$NAME is "
if flink_check_pidfile $PID_FILE ; then
echo "running"
else
echo "not running."
exit 1
fi
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2
exit 1
;;
esac
}
flink_service "$1"
exit 0
################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################
Package: [[name]]
Version: [[version]]
Section: misc
Depends: default-jre
Priority: low
Architecture: all
Description: Flink is a distributed parallel data processing system
Maintainer: Flink team <dev@flink.apache.org>
#!/bin/sh
################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################
# postinst script for importer
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
if ! getent group flink >/dev/null; then
addgroup --system flink
fi
if ! getent passwd flink >/dev/null; then
adduser --quiet \
--system \
--ingroup flink \
--quiet \
--disabled-login \
--disabled-password \
--home /usr/share/flink-dist \
--no-create-home \
-gecos "Flink User" \
flink
fi
if [ -z "$2" ]; then
chown -R flink:flink /var/log/flink-dist
fi
sed -i s'#./resources/web-docs#/usr/share/flink-dist/resources/web-docs#' /usr/share/flink-dist/conf/flink-conf.yaml
# append infoserver configuration
echo "jobmanager.web.rootpath: /usr/share/flink-dist/resources/web-docs-infoserver" >> /usr/share/flink-dist/conf/flink-conf.yaml
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册