opt: adb change directory
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
# !/bin/bash
|
||||
|
||||
RedisRootDir=/usr/local/db
|
||||
RedisConfDir=${RedisRootDir}/bin/conf
|
||||
RedisRootDir=/usr/local
|
||||
RedisOldRootDir=/usr/local/db
|
||||
RedisConfDir=${RedisRootDir}/etc/adb
|
||||
DependsRootDir=/usr/local/omc/depends
|
||||
SystemdRootDir=/lib/systemd/system
|
||||
OMCEtcDir=/usr/local/omc/etc
|
||||
@@ -53,18 +54,23 @@ for CFile in ${CFileList}; do
|
||||
done
|
||||
|
||||
# Install redis db if not exist /usr/local/db
|
||||
if [ ! -e "${RedisRootDir}/bin/redis-server" ]; then
|
||||
if [ ! -e "${RedisRootDir}" ]; then
|
||||
mkdir -p ${RedisRootDir}
|
||||
fi
|
||||
cp -rf ${DependsRootDir}/redis/* ${RedisRootDir}
|
||||
if [ ! -e "${RedisRootDir}/bin/adb-server" ]; then
|
||||
# if [ ! -e "${RedisRootDir}" ]; then
|
||||
# mkdir -p ${RedisRootDir}
|
||||
# fi
|
||||
|
||||
cp -rf ${DependsRootDir}/adb/* /
|
||||
chmod +rx ${RedisRootDir}/bin/*
|
||||
if [ ! -e "${RedisConfDir}/redis.conf" ]; then
|
||||
cp ${RedisConfDir}/default/redis.conf ${RedisConfDir};
|
||||
if [ ! -e "${RedisConfDir}/adb.conf" ]; then
|
||||
cp ${RedisConfDir}/default/adb.conf ${RedisConfDir};
|
||||
else
|
||||
sed -i 's/replica-read-only yes/replica-read-only no/g' ${RedisConfDir}/redis.conf
|
||||
sed -i 's/replica-read-only yes/replica-read-only no/g' ${RedisConfDir}/adb.conf
|
||||
fi
|
||||
cp -f ${DependsRootDir}/systemd/adb.service ${SystemdRootDir}
|
||||
# copy the orangin dump.rdb
|
||||
if [ -e "${RedisOldRootDir}/bin/conf/dump.rdb" ]; then
|
||||
cp -f ${RedisOldRootDir}/bin/conf/dump.rdb ${RedisConfDir};
|
||||
fi
|
||||
# cp -f ${DependsRootDir}/systemd/adb.service ${SystemdRootDir}
|
||||
fi
|
||||
|
||||
if [ ! -e "${FERootDir}/config.js" ]; then
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/local/bin/adb-server /usr/local/etc/adb/adb.conf
|
||||
ExecStopPost=
|
||||
PIDFile=
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
BIN
debbuild/22.04/usr/local/omc/depends/adb/usr/local/bin/adb-cli
Normal file
BIN
debbuild/22.04/usr/local/omc/depends/adb/usr/local/bin/adb-cli
Normal file
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,8 @@
|
||||
# !/bin/bash
|
||||
|
||||
RedisRootDir=/usr/local/db
|
||||
RedisConfDir=${RedisRootDir}/bin/conf
|
||||
RedisRootDir=/usr/local
|
||||
RedisOldRootDir=/usr/local/db
|
||||
RedisConfDir=${RedisRootDir}/etc/adb
|
||||
DependsRootDir=/usr/local/omc/depends
|
||||
SystemdRootDir=/lib/systemd/system
|
||||
OMCEtcDir=/usr/local/omc/etc
|
||||
@@ -53,18 +54,23 @@ for CFile in ${CFileList}; do
|
||||
done
|
||||
|
||||
# Install redis db if not exist /usr/local/db
|
||||
if [ ! -e "${RedisRootDir}/bin/redis-server" ]; then
|
||||
if [ ! -e "${RedisRootDir}" ]; then
|
||||
mkdir -p ${RedisRootDir}
|
||||
fi
|
||||
cp -rf ${DependsRootDir}/redis/* ${RedisRootDir}
|
||||
if [ ! -e "${RedisRootDir}/bin/adb-server" ]; then
|
||||
# if [ ! -e "${RedisRootDir}" ]; then
|
||||
# mkdir -p ${RedisRootDir}
|
||||
# fi
|
||||
|
||||
cp -rf ${DependsRootDir}/adb/* /
|
||||
chmod +rx ${RedisRootDir}/bin/*
|
||||
if [ ! -e "${RedisConfDir}/redis.conf" ]; then
|
||||
cp ${RedisConfDir}/default/redis.conf ${RedisConfDir};
|
||||
if [ ! -e "${RedisConfDir}/adb.conf" ]; then
|
||||
cp ${RedisConfDir}/default/adb.conf ${RedisConfDir};
|
||||
else
|
||||
sed -i 's/replica-read-only yes/replica-read-only no/g' ${RedisConfDir}/redis.conf
|
||||
sed -i 's/replica-read-only yes/replica-read-only no/g' ${RedisConfDir}/adb.conf
|
||||
fi
|
||||
cp -f ${DependsRootDir}/systemd/adb.service ${SystemdRootDir}
|
||||
# copy the orangin dump.rdb
|
||||
if [ -e "${RedisOldRootDir}/bin/conf/dump.rdb" ]; then
|
||||
cp -f ${RedisOldRootDir}/bin/conf/dump.rdb ${RedisConfDir};
|
||||
fi
|
||||
# cp -f ${DependsRootDir}/systemd/adb.service ${SystemdRootDir}
|
||||
fi
|
||||
|
||||
if [ ! -e "${FERootDir}/config.js" ]; then
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/local/bin/adb-server /usr/local/etc/adb/adb.conf
|
||||
ExecStopPost=
|
||||
PIDFile=
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
BIN
debbuild/usr/local/omc/depends/adb/usr/local/bin/adb-cli
Normal file
BIN
debbuild/usr/local/omc/depends/adb/usr/local/bin/adb-cli
Normal file
Binary file not shown.
BIN
debbuild/usr/local/omc/depends/adb/usr/local/bin/adb-server
Normal file
BIN
debbuild/usr/local/omc/depends/adb/usr/local/bin/adb-server
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user