opt: adb change directory
This commit is contained in:
1 parent
94ce3910e0
commit
55b3bc7152
13 files changed
+5607
-22
No files matched your search
@@ -1,7 +1,8 @@
|
|||||||
# !/bin/bash
|
# !/bin/bash
|
||||||
|
|
||||||
RedisRootDir=/usr/local/db
|
RedisRootDir=/usr/local
|
||||||
RedisConfDir=${RedisRootDir}/bin/conf
|
RedisOldRootDir=/usr/local/db
|
||||||
|
RedisConfDir=${RedisRootDir}/etc/adb
|
||||||
DependsRootDir=/usr/local/omc/depends
|
DependsRootDir=/usr/local/omc/depends
|
||||||
SystemdRootDir=/lib/systemd/system
|
SystemdRootDir=/lib/systemd/system
|
||||||
OMCEtcDir=/usr/local/omc/etc
|
OMCEtcDir=/usr/local/omc/etc
|
||||||
@@ -53,18 +54,23 @@ for CFile in ${CFileList}; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Install redis db if not exist /usr/local/db
|
# Install redis db if not exist /usr/local/db
|
||||||
if [ ! -e "${RedisRootDir}/bin/redis-server" ]; then
|
if [ ! -e "${RedisRootDir}/bin/adb-server" ]; then
|
||||||
if [ ! -e "${RedisRootDir}" ]; then
|
# if [ ! -e "${RedisRootDir}" ]; then
|
||||||
mkdir -p ${RedisRootDir}
|
# mkdir -p ${RedisRootDir}
|
||||||
fi
|
# fi
|
||||||
cp -rf ${DependsRootDir}/redis/* ${RedisRootDir}
|
|
||||||
|
cp -rf ${DependsRootDir}/adb/* /
|
||||||
chmod +rx ${RedisRootDir}/bin/*
|
chmod +rx ${RedisRootDir}/bin/*
|
||||||
if [ ! -e "${RedisConfDir}/redis.conf" ]; then
|
if [ ! -e "${RedisConfDir}/adb.conf" ]; then
|
||||||
cp ${RedisConfDir}/default/redis.conf ${RedisConfDir};
|
cp ${RedisConfDir}/default/adb.conf ${RedisConfDir};
|
||||||
else
|
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
|
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
|
fi
|
||||||
|
|
||||||
if [ ! -e "${FERootDir}/config.js" ]; then
|
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
|
||||||
|
|
||||||
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
Whitespace-only changes.
+17
-11
@@ -1,7 +1,8 @@
|
|||||||
# !/bin/bash
|
# !/bin/bash
|
||||||
|
|
||||||
RedisRootDir=/usr/local/db
|
RedisRootDir=/usr/local
|
||||||
RedisConfDir=${RedisRootDir}/bin/conf
|
RedisOldRootDir=/usr/local/db
|
||||||
|
RedisConfDir=${RedisRootDir}/etc/adb
|
||||||
DependsRootDir=/usr/local/omc/depends
|
DependsRootDir=/usr/local/omc/depends
|
||||||
SystemdRootDir=/lib/systemd/system
|
SystemdRootDir=/lib/systemd/system
|
||||||
OMCEtcDir=/usr/local/omc/etc
|
OMCEtcDir=/usr/local/omc/etc
|
||||||
@@ -53,18 +54,23 @@ for CFile in ${CFileList}; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Install redis db if not exist /usr/local/db
|
# Install redis db if not exist /usr/local/db
|
||||||
if [ ! -e "${RedisRootDir}/bin/redis-server" ]; then
|
if [ ! -e "${RedisRootDir}/bin/adb-server" ]; then
|
||||||
if [ ! -e "${RedisRootDir}" ]; then
|
# if [ ! -e "${RedisRootDir}" ]; then
|
||||||
mkdir -p ${RedisRootDir}
|
# mkdir -p ${RedisRootDir}
|
||||||
fi
|
# fi
|
||||||
cp -rf ${DependsRootDir}/redis/* ${RedisRootDir}
|
|
||||||
|
cp -rf ${DependsRootDir}/adb/* /
|
||||||
chmod +rx ${RedisRootDir}/bin/*
|
chmod +rx ${RedisRootDir}/bin/*
|
||||||
if [ ! -e "${RedisConfDir}/redis.conf" ]; then
|
if [ ! -e "${RedisConfDir}/adb.conf" ]; then
|
||||||
cp ${RedisConfDir}/default/redis.conf ${RedisConfDir};
|
cp ${RedisConfDir}/default/adb.conf ${RedisConfDir};
|
||||||
else
|
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
|
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
|
fi
|
||||||
|
|
||||||
if [ ! -e "${FERootDir}/config.js" ]; then
|
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
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large.
Load diff
Whitespace-only changes.
Reference in new issue
Block a user