Compare commits

..

No commits in common. "66b42612f9d440270c8f49eebb53724119c42d1a" and "873862424c8cfedc8fbabaef96cebcf8d6688bc5" have entirely different histories.

4 changed files with 1 additions and 55 deletions

View File

@ -1,54 +0,0 @@
from zephir.lib_zephir import *
import os, shutil
from creole.config import eoledirs, distrib_dir, dicos_dir
from creole.client import CreoleClient, NotFoundError
from pyeole.service import manage_service, unmanaged_service
creole_client = CreoleClient()
try:
eole_module = creole_client.get_creole('eole_module')
eole_version = creole_client.get_creole('eole_release')
except Exception, exc:
print_red("\nErreur d'accès au service creoled :\n\n")
print str(exc)
exit(1)
stats_running = False
stats_service = u'z_stats'
if os.path.isfile('/var/run/z_stats.pid'):
stats_running = True
try:
from zephir.zephir_conf import zephir_conf
except:
zephir_conf = None
if stats_running:
manage_service(u'stop', stats_service)
if eole_module != 'zephir':
if zephir_conf is not None:
# agents de surveillance : on réinitialise le n° de l'agent à 0 pour les stats
# si il existe déjà
stats_dir = '%s/monitor/stats/' % zephir_dir
# ancien répertoire de stockage
old_id = str(zephir_conf.id_serveur)
if os.path.isdir(stats_dir + old_id):
shutil.move(stats_dir + old_id, stats_dir + '0')
try:
os.unlink("%s/zephir_conf/zephir_conf.py" % zephir_path)
except:
print("\n !! le fichier %s/zephir_conf/zephir_conf.py n'a pas pu être supprimé !!\n" % zephir_d_path)
try:
os.unlink("%s/zephir_conf/zephir_conf.pyc" % zephir_path)
try:
f=file("%s/deffered_logs" % zephir_dir, "w")
f.close()
shutil.rmtree("/var/spool/uucp/zephir")
except:
pass
except:
pass
if stats_running:
manage_service(u'start', stats_service)

View File

@ -23,7 +23,7 @@ from zephir.lib_zephir import flushed_input
def display_help():
print("Sauvegarde une cle ssh d'un utilisateur dans Zephir")
print("{} [utilisateur] [--key chemin_de_la_clé]".format(sys.argv[0]))
print("{} [utilisaeur] [--key chemin_de_la_clé]".format(sys.argv[0]))
def argparser():