Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
iso8583
/
iso8583-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit daa43e10
authored
Apr 14, 2019
by
aa.gusti
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add init file
1 parent
60f0a3ec
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
0 deletions
contrib/iso8583.init
contrib/iso8583.init
0 → 100755
View file @
daa43e1
#!/bin/sh
### BEGIN INIT INFO
# Provides: iso8583-bjb-bphtb
# Required-Start: cron
# Required-Stop: cron
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: ISO 8583 Forwarder BJB BPHTB
# Description: BJB BPHTB ISO 8583 Forwarder
### END INIT INFO
BIN
=
"/home/bphtb/bin/start"
PID
=
"/home/bphtb/tmp/iso8583-bphtb.pid"
DESC
=
"ISO8583 Forwarder BPHTB BJB"
USER
=
"bphtb"
GROUP
=
"bphtb"
CONF
=
"/home/bphtb/bjb-bphtb/production.ini"
# /home/samsat-banten/iso8583-web/env/bin/iso8583 \
# /home/samsat-banten/iso8583-web/iso8583.ini \
# $@
. /lib/lsb/init-functions
killtree
()
{
local
_pid
=
$1
local
_sig
=
${
2
-TERM
}
for
_child
in
$(
ps -o pid --no-headers --ppid
${
_pid
})
;
do
killtree
${
_child
}
${
_sig
}
done
kill
-
${
_sig
}
${
_pid
}
}
case
$1
in
start
)
log_begin_msg
"Starting
$DESC
"
[
-z
`
cat
$PID
2>/dev/null
`
]
&&
\
/sbin/start-stop-daemon --start --chuid
"
$USER
:
$GROUP
"
--background
\
--make-pidfile
$PID
--pidfile
$PID
--exec
$BIN
||
true
log_end_msg
$?
;;
stop
)
log_begin_msg
"Stopping
$DESC
PID
$(
cat
$PID
)
"
[
-z
`
cat
$PID
2>/dev/null
`
]
||
\
while
test
-d /proc/
$(
cat
$PID
)
;
do
killtree
$(
cat
$PID
)
15
sleep 0.5
done
[
-z
`
cat
$PID
2>/dev/null
`
]
||
rm
$PID
log_end_msg
$?
;;
status
)
status_of_proc -p
$PID
""
$DESC
&&
exit
0
||
exit
$?
;;
restart
)
$0
stop
sleep 3
$0
start
;;
*
)
echo
"Usage:
$0
{start|stop|restart|status}"
esac
exit
0
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment