mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
system位置更改
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user