mirror of
https://github.com/alexreinert/homematic_check_mk.git
synced 2023-10-10 13:37:02 +02:00
23 lines
400 B
Plaintext
23 lines
400 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
ADDONNAME=check_mk_agent
|
||
|
CONFIG_DIR=/usr/local/etc/config
|
||
|
ADDON_DIR=/usr/local/addons/${ADDONNAME}
|
||
|
RCD_DIR=${CONFIG_DIR}/rc.d
|
||
|
|
||
|
mount | grep /usr/local 2>&1 >/dev/null
|
||
|
if [ $? -eq 1 ]; then
|
||
|
mount /usr/local
|
||
|
fi
|
||
|
|
||
|
# create necessary directories
|
||
|
mkdir -p ${ADDON_DIR}
|
||
|
chmod 755 ${ADDON_DIR}
|
||
|
mkdir -p ${RCD_DIR}
|
||
|
chmod 755 ${RCD_DIR}
|
||
|
|
||
|
cp -af addon/* ${ADDON_DIR}
|
||
|
cp -af rc.d/* ${RCD_DIR}
|
||
|
|
||
|
sync
|