pull/123/head
midoks 3 years ago
parent d7e0251d1f
commit 9aa2d5f090
  1. 7
      class/core/mw.py
  2. 2
      plugins/gogs/index.py
  3. 2
      plugins/memcached/index.py
  4. 2
      plugins/mongodb/install.sh
  5. 2
      plugins/mysql/index.py
  6. 2
      plugins/openresty/index.py
  7. 2
      plugins/php/index.py
  8. 2
      plugins/pureftp/index.py
  9. 2
      plugins/redis/index.py
  10. 2
      plugins/rsyncd/index.py
  11. 2
      plugins/sphinx/index.py
  12. 2
      plugins/supervisor/index.py
  13. 2
      plugins/swap/index.py

@ -91,6 +91,13 @@ def triggerTask():
writeFile(isTask, 'True') writeFile(isTask, 'True')
def systemdCfgDir():
cfg_dir = '/usr/lib/systemd/user'
if os.path.exists(cfg_dir):
return cfg_dir
return "/usr/lib/systemd/system"
def getOs(): def getOs():
return sys.platform return sys.platform

@ -157,7 +157,7 @@ def initDreplace():
# mw.writeFile(conf_bin, content) # mw.writeFile(conf_bin, content)
# systemd # systemd
systemDir = '/usr/lib/systemd/system' systemDir = mw.systemdCfgDir()
systemService = systemDir + '/gogs.service' systemService = systemDir + '/gogs.service'
systemServiceTpl = getPluginDir() + '/init.d/gogs.service.tpl' systemServiceTpl = getPluginDir() + '/init.d/gogs.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService): if os.path.exists(systemDir) and not os.path.exists(systemService):

@ -104,7 +104,7 @@ def initDreplace():
mw.execShell('chmod +x ' + file_bin) mw.execShell('chmod +x ' + file_bin)
# systemd # systemd
systemDir = '/usr/lib/systemd/system' systemDir = mw.systemdCfgDir()
systemService = systemDir + '/memcached.service' systemService = systemDir + '/memcached.service'
systemServiceTpl = getPluginDir() + '/init.d/memcached.service.tpl' systemServiceTpl = getPluginDir() + '/init.d/memcached.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService): if os.path.exists(systemDir) and not os.path.exists(systemService):

@ -63,7 +63,7 @@ if [ -f /usr/lib/systemd/system/mongod.service ];then
fi fi
wget -qO - https://www.mongodb.org/static/pgp/server-${VERSION}.asc | sudo apt-key add - wget -qO - https://www.mongodb.org/static/pgp/server-${VERSION}.asc | sudo apt-key add -
sudo apt install gnupg apt install -y gnupg
touch /etc/apt/sources.list.d/mongodb-org-${VERSION}.list touch /etc/apt/sources.list.d/mongodb-org-${VERSION}.list
lsb_release -dc lsb_release -dc

@ -182,7 +182,7 @@ def initDreplace(version=''):
mw.writeFile(mysql_conf, content) mw.writeFile(mysql_conf, content)
# systemd # systemd
systemDir = '/usr/lib/systemd/system' systemDir = mw.systemdCfgDir()
systemService = systemDir + '/mysql.service' systemService = systemDir + '/mysql.service'
systemServiceTpl = getPluginDir() + '/init.d/mysql.service.tpl' systemServiceTpl = getPluginDir() + '/init.d/mysql.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService): if os.path.exists(systemDir) and not os.path.exists(systemService):

@ -174,7 +174,7 @@ def initDreplace():
confReplace() confReplace()
# systemd # systemd
systemDir = '/usr/lib/systemd/system' systemDir = mw.systemdCfgDir()
systemService = systemDir + '/openresty.service' systemService = systemDir + '/openresty.service'
systemServiceTpl = getPluginDir() + '/init.d/openresty.service.tpl' systemServiceTpl = getPluginDir() + '/init.d/openresty.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService): if os.path.exists(systemDir) and not os.path.exists(systemService):

@ -253,7 +253,7 @@ def initReplace(version):
mw.execShell('chown -R www:www ' + upload_path) mw.execShell('chown -R www:www ' + upload_path)
# systemd # systemd
systemDir = '/usr/lib/systemd/system' systemDir = mw.systemdCfgDir()
systemService = systemDir + '/php' + version + '.service' systemService = systemDir + '/php' + version + '.service'
systemServiceTpl = getPluginDir() + '/init.d/php.service.tpl' systemServiceTpl = getPluginDir() + '/init.d/php.service.tpl'
if version == '52': if version == '52':

@ -117,7 +117,7 @@ def initDreplace():
mw.writeFile(pureFtpdConfig, content) mw.writeFile(pureFtpdConfig, content)
# systemd # systemd
systemDir = '/usr/lib/systemd/system' systemDir = mw.systemdCfgDir()
systemService = systemDir + '/pureftp.service' systemService = systemDir + '/pureftp.service'
systemServiceTpl = getPluginDir() + '/init.d/pureftp.service.tpl' systemServiceTpl = getPluginDir() + '/init.d/pureftp.service.tpl'

@ -104,7 +104,7 @@ def initDreplace():
mw.writeFile(dst_conf_init, 'ok') mw.writeFile(dst_conf_init, 'ok')
# systemd # systemd
systemDir = '/usr/lib/systemd/system' systemDir = mw.systemdCfgDir()
systemService = systemDir + '/redis.service' systemService = systemDir + '/redis.service'
systemServiceTpl = getPluginDir() + '/init.d/redis.service.tpl' systemServiceTpl = getPluginDir() + '/init.d/redis.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService): if os.path.exists(systemDir) and not os.path.exists(systemService):

@ -126,7 +126,7 @@ def initDreplace():
mw.execShell('chmod +x ' + file_bin) mw.execShell('chmod +x ' + file_bin)
# systemd # systemd
systemDir = '/usr/lib/systemd/system' systemDir = mw.systemdCfgDir()
systemService = systemDir + '/rsyncd.service' systemService = systemDir + '/rsyncd.service'
systemServiceTpl = getPluginDir() + '/init.d/rsyncd.service.tpl' systemServiceTpl = getPluginDir() + '/init.d/rsyncd.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService): if os.path.exists(systemDir) and not os.path.exists(systemService):

@ -147,7 +147,7 @@ def initDreplace():
mw.writeFile(getServerDir() + '/sphinx.conf', conf_content) mw.writeFile(getServerDir() + '/sphinx.conf', conf_content)
# systemd # systemd
systemDir = '/usr/lib/systemd/system' systemDir = mw.systemdCfgDir()
systemService = systemDir + '/sphinx.service' systemService = systemDir + '/sphinx.service'
systemServiceTpl = getPluginDir() + '/init.d/sphinx.service.tpl' systemServiceTpl = getPluginDir() + '/init.d/sphinx.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService): if os.path.exists(systemDir) and not os.path.exists(systemService):

@ -81,7 +81,7 @@ def initDreplace():
confD = getServerDir() + "/conf.d" confD = getServerDir() + "/conf.d"
conf = getServerDir() + "/supervisor.conf" conf = getServerDir() + "/supervisor.conf"
systemDir = '/lib/systemd/system' systemDir = mw.systemdCfgDir()
systemService = systemDir + '/supervisor.service' systemService = systemDir + '/supervisor.service'
systemServiceTpl = getPluginDir() + '/init.d/supervisor.service' systemServiceTpl = getPluginDir() + '/init.d/supervisor.service'

@ -84,7 +84,7 @@ def initDreplace():
mw.execShell('chmod +x ' + file_bin) mw.execShell('chmod +x ' + file_bin)
# systemd # systemd
systemDir = '/usr/lib/systemd/system' systemDir = mw.systemdCfgDir()
systemService = systemDir + '/swap.service' systemService = systemDir + '/swap.service'
systemServiceTpl = getPluginDir() + '/init.d/swap.service.tpl' systemServiceTpl = getPluginDir() + '/init.d/swap.service.tpl'
if os.path.exists(systemDir) and not os.path.exists(systemService): if os.path.exists(systemDir) and not os.path.exists(systemService):

Loading…
Cancel
Save