This repository has been archived on 2026-05-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
codiki-old/src/main/bash/codiki-integ-init.d.sh
T

24 lines
772 B
Bash
Executable File

#!/bin/sh
case "$1" in
'start')
sudo -H -u wildfly bash -c '/opt/codiki-integ/bin/codiki-integ.sh start'
;;
'stop')
sudo -H -u wildfly bash -c '/opt/codiki-integ/bin/codiki-integ.sh stop'
;;
'status')
sudo -H -u wildfly bash -c '/opt/codiki-integ/bin/codiki-integ.sh status'
;;
'restart')
sudo -H -u wildfly bash -c '/opt/codiki-integ/bin/codiki-integ.sh restart'
;;
*)
# If no argument, we launch the app in case of server startup
sudo -H -u wildfly bash -c '/opt/codiki-integ/bin/codiki-integ.sh start &>/dev/null'
# And show the script usage
echo "Usage: /etc/init.d/codiki-integ {start|stop|status|restart}\n" >&2
exit 3
;;
esac
exit 0