Server IP : 158.178.228.73 / Your IP : 80.80.80.153 Web Server : Apache/2.4.37 (Oracle Linux Server) OpenSSL/1.1.1k System : Linux ust-wp1-prod 5.15.0-308.179.6.el8uek.x86_64 #2 SMP Wed Apr 23 10:46:57 PDT 2025 x86_64 User : tomasFtp ( 1007) PHP Version : 8.4.8 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/thread-self/root/proc/self/root/proc/thread-self/root/usr/bin/ |
Upload File : |
#!/bin/bash # Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved. # Licensed under the Universal Permissive License v 1.0 as shown at # http://oss.oracle.com/licenses/upl. # utility assists with configuring iscsi storage on Oracle Cloud # Infrastructure instances. See the manual page for more information. _PY3=/usr/bin/python3 _PY_CMD=oci_notify_main.py s_dir=`${_PY3} -c 'import os.path ; import oci_utils.impl ; print (os.path.dirname(oci_utils.impl.__file__))' 2>/dev/null` declare COMMAND declare -A TOPICOCID declare -A MSGDATA declare -A MSGTITLE declare notify_exec="${s_dir}/${_PY_CMD}" if [ "${1:0:1}" != '-' ] then # execute as is as the command line do not start with an option dash-<something> exec ${_PY3} $notify_exec "$@" exit 0 fi PARSED_ARGUMENTS=$(getopt --alternative --quiet --options c:t:f:h --longoptions config:,title:,file:,help -- "$@") eval set -- "$PARSED_ARGUMENTS" while : do case "$1" in -c|--config) COMMAND='config'; TOPICOCID=${2}; shift 2 ;; -t|--title) COMMAND='message'; MSGTITLE=${2}; shift 2 ;; -f|--file) COMMAND='message'; MSGDATA=${2}; shift 2 ;; -h|--help) COMMAND='--help'; shift ;; --) shift; break ;; *) COMMAND='--help' ;; esac done if [ ${COMMAND} == '--help' ]; then exec ${_PY3} ${notify_exec} --help elif [ -z "${TOPICOCID+x}" ]; then # no topic, must be message. if [ -z "${MSGTITLE+x}" -o -z "${MSGDATA+x}" ]; then exec ${_PY3} ${notify_exec} --help else exec ${_PY3} ${notify_exec} message --title "${MSGTITLE}" --file "${MSGDATA}" fi else # topic is defined, must be config exec ${_PY3} ${notify_exec} config "$TOPICOCID" fi exit 0