Commit 869b6f4d authored by Lucas Russo's avatar Lucas Russo

scripts/*: add upstart/systemd scripts

parent 22927cc2
#!/bin/bash
LOG_DIR="/media/remote_logs"
REMOTE_HOST="10.0.18.35"
REMOTE_LOG_DIR="/export/remote_logs"
#rm -rf ${LOG_DIR}
#mkdir -p ${LOG_DIR}
#mount -t nfs -o proto=tcp,port=2049 ${REMOTE_HOST}:${REMOTE_LOG_DIR} ${LOG_DIR}
#sshfs -o allow_other -o kernel_cache -o auto_cache -o reconnect -o compression=no -o cache_timeout=600 -o ServerAliveInterval=15 ${REMOTE_HOST}:${REMOTE_LOG_DIR} ${LOG_DIR}
# BPM-SW server script
# this script will start/stop the BPM-SW server
# When to start the service
start on runlevel [2345]
# When to stop the service
stop on runlevel [016]
# if you want it to automatically restart if it crashes, leave the next line in
respawn
# configuration variables.
# You'll want to change these as needed
# tell upstart we're creating a daemon
# upstart manages PID creation for you.
expect fork
script
# My startup script, plain old shell scripting here.
exec /usr/local/bin/dev_mngr &
#emit fcs_server_running
end script
#!/bin/bash
killall dev_io
killall mdp_broker
killall dev_mngr
[Unit]
Description=BPM-SW server
After=network-online.target
Wants=network-online.target
After=media-remote_logs.mount
Requires=media-remote_logs.mount
[Service]
ExecStartPre=/usr/local/bin/bpm-sw-prepare-log.sh
ExecStart=/usr/local/bin/dev_mngr
WorkingDirectory=/usr/local/bin
ExecStop=/usr/local/bin/bpm-sw-shutdown.sh
[Install]
WantedBy=multi-user.target
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment