This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Licence: GPLv3, MIT, BSD, Apache or whatever you prefer; FREE to use, modify, copy, no obligations | |
# Description: Bash Script to Start the process with NOHUP and & - in background, pretend to be a Daemon | |
# Author: Andrew Bikadorov | |
# Script v1.5 | |
# For debugging purposes uncomment next line | |
#set -x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Apache Kafka server (broker) | |
Documentation=http://kafka.apache.org/documentation.html | |
Requires=zookeeper.service network.target remote-fs.target | |
After=zookeeper.service network.target remote-fs.target | |
[Service] | |
Type=forking | |
PIDFile=/var/run/kafka.pid | |
ExecStart=/home/user/bin/kafka start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Exit from build: | |
#params: 1 - status, 2 - callback command to call before exit, 3 - comment text for failed GitHub commit | |
exit_on_error() { | |
if [ $1 -ne 0 ] | |
then | |
echo '=== ### Exit On Error ### ===' | |
if [ "$2" != '' ] | |
then | |
$2 |