system位置更改

This commit is contained in:
midoks
2022-07-03 22:22:03 +08:00
parent 0d3a829b6d
commit eec656c278
10 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ def initDreplace():
# mw.writeFile(conf_bin, content)
# systemd
systemDir = '/lib/systemd/system'
systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/gogs.service'
systemServiceTpl = getPluginDir() + '/init.d/gogs.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService):
+2 -2
View File
@@ -79,10 +79,10 @@ Install_gogs()
Uninstall_gogs()
{
if [ -f /lib/systemd/system/gogs.service ];then
if [ -f /usr/lib/systemd/system/gogs.service ];then
systemctl stop gogs
systemctl disable gogs
rm -rf /lib/systemd/system/gogs.service
rm -rf /usr/lib/systemd/system/gogs.service
systemctl daemon-reload
fi
+1 -1
View File
@@ -104,7 +104,7 @@ def initDreplace():
mw.execShell('chmod +x ' + file_bin)
# systemd
systemDir = '/lib/systemd/system'
systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/memcached.service'
systemServiceTpl = getPluginDir() + '/init.d/memcached.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService):
+2 -2
View File
@@ -38,10 +38,10 @@ Install_mem(){
Uninstall_mem()
{
if [ -f /lib/systemd/system/memcached.service ];then
if [ -f /usr/lib/systemd/system/memcached.service ];then
systemctl stop memcached
systemctl disable memcached
rm -rf /lib/systemd/system/memcached.service
rm -rf /usr/lib/systemd/system/memcached.service
systemctl daemon-reload
fi
+1 -1
View File
@@ -176,7 +176,7 @@ def initDreplace(version=''):
mw.writeFile(mysql_conf, content)
# systemd
systemDir = '/lib/systemd/system'
systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/mysql.service'
systemServiceTpl = getPluginDir() + '/init.d/mysql.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService):
+2 -2
View File
@@ -26,10 +26,10 @@ fi
if [ "${action}" == "uninstall" ];then
if [ -f /lib/systemd/system/mysql.service ];then
if [ -f /usr/lib/systemd/system/mysql.service ];then
systemctl stop mysql
systemctl disable mysql
rm -rf /lib/systemd/system/mysql.service
rm -rf /usr/lib/systemd/system/mysql.service
systemctl daemon-reload
fi
fi
+1 -1
View File
@@ -117,7 +117,7 @@ def initDreplace():
mw.writeFile(pureFtpdConfig, content)
# systemd
systemDir = '/lib/systemd/system'
systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/pureftp.service'
systemServiceTpl = getPluginDir() + '/init.d/pureftp.service.tpl'
+2 -2
View File
@@ -88,10 +88,10 @@ Install_pureftp()
Uninstall_pureftp()
{
if [ -f /lib/systemd/system/pureftp.service ];then
if [ -f /usr/lib/systemd/system/pureftp.service ];then
systemctl stop pureftp
systemctl disable pureftp
rm -rf /lib/systemd/system/pureftp.service
rm -rf /usr/lib/systemd/system/pureftp.service
systemctl daemon-reload
fi
+1 -1
View File
@@ -104,7 +104,7 @@ def initDreplace():
mw.writeFile(dst_conf_init, 'ok')
# systemd
systemDir = '/lib/systemd/system'
systemDir = '/usr/lib/systemd/system'
systemService = systemDir + '/redis.service'
systemServiceTpl = getPluginDir() + '/init.d/redis.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService):
+2 -2
View File
@@ -40,10 +40,10 @@ Install_redis()
Uninstall_redis()
{
if [ -f /lib/systemd/system/redis.service ];then
if [ -f /usr/lib/systemd/system/redis.service ];then
systemctl stop redis
systemctl disable redis
rm -rf /lib/systemd/system/redis.service
rm -rf /usr/lib/systemd/system/redis.service
systemctl daemon-reload
fi