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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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