diff options
Diffstat (limited to '')
-rwxr-xr-x | bin/container | 14 | ||||
-rwxr-xr-x | bin/container-shell | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/bin/container b/bin/container index 4570dc3..c3748d9 100755 --- a/bin/container +++ b/bin/container @@ -15,7 +15,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e @@ -23,7 +23,7 @@ PROJECT="open-infrastructure" SOFTWARE="compute-tools" PROGRAM="container" -HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" +HOOKS="/etc/${SOFTWARE}/hooks" # Parameter PARAMETER="${1}" @@ -44,7 +44,7 @@ OPTIONS="${@}" for COMMAND in $(echo ${COMMANDS} | sed -e 's|,| |g') do - if [ ! -e "/usr/lib/${PROJECT}/${PROGRAM}/${COMMAND}" ] + if [ ! -e "/usr/libexec/${PROGRAM}/${COMMAND}" ] then echo "'${COMMAND}': no such ${PROGRAM} command" >&2 exit 1 @@ -71,12 +71,12 @@ do HOST="$(hostname -f 2> /dev/null || hostname)" # logfile - echo "${DATE} ${HOST} ${USER} ${PROGRAM} ${COMMAND} ${OPTIONS}" >> "/var/log/${PROJECT}/${PROGRAM}.log" + echo "${DATE} ${HOST} ${USER} ${PROGRAM} ${COMMAND} ${OPTIONS}" >> "/var/log/${SOFTWARE}/${PROGRAM}.log" # irc - if [ -e /usr/bin/irk ] && [ -e "/etc/${PROJECT}/${PROGRAM}.conf" ] + if [ -e /usr/bin/irk ] && [ -e "/etc/${SOFTWARE}.conf" ] then - . "/etc/${PROJECT}/${PROGRAM}.conf" + . "/etc/${SOFTWARE}.conf" if [ -n "${IRK_TARGETS}" ] then @@ -91,7 +91,7 @@ do fi # Run - "/usr/lib/${PROJECT}/${PROGRAM}/${COMMAND}" "${OPTIONS}" + "/usr/libexec/${PROGRAM}/${COMMAND}" "${OPTIONS}" # Post hooks for FILE in "${HOOKS}/post-${PROGRAM}".* "${HOOKS}/${NAME}.post-${PROGRAM}" diff --git a/bin/container-shell b/bin/container-shell index 016724f..98ece06 100755 --- a/bin/container-shell +++ b/bin/container-shell @@ -15,7 +15,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. set -e @@ -64,7 +64,7 @@ Shell () echo "The following ${PROGRAM} commands are available:" echo - cd "/usr/lib/${PROJECT}/${PROGRAM}" + cd "/usr/libexec/${PROGRAM}" find . -type f -printf " %f\n" | sort cd "${OLDPWD}" @@ -97,7 +97,7 @@ Shell () ;; esac - if [ ! -e "/usr/lib/${PROJECT}/${PROGRAM}/${COMMAND}" ] + if [ ! -e "/usr/libexec/${PROGRAM}/${COMMAND}" ] then echo "'${COMMAND}': no such ${PROGRAM} command" >&2 return |