Просмотр исходного кода

Changing bot shortname to 'mab'

Penta 5 лет назад
Родитель
Сommit
054f5b6560
2 измененных файлов с 8 добавлено и 8 удалено
  1. 6 6
      extra/malbot.service
  2. 2 2
      myanimebot/globals.py

+ 6 - 6
extra/malbot.service

@@ -1,20 +1,20 @@
 [Unit]
 [Unit]
-Description=MyAnimeList Discord Bot
+Description=MyAnimeList & Anilist Discord Bot
 After=network.target nss-lookup.target
 After=network.target nss-lookup.target
 
 
 [Service]
 [Service]
 Type=simple
 Type=simple
-WorkingDirectory=/opt/malbot/
-ExecStart=/usr/local/bin/python3.7 /opt/malbot/myanimebot.py
+WorkingDirectory=/opt/MyAnimeBot/
+ExecStart=/usr/local/bin/python3.7 /opt/MyAnimeBot/myanimebot.py
 ExecStop=/bin/kill -15 $MAINPID
 ExecStop=/bin/kill -15 $MAINPID
 Restart=on-failure
 Restart=on-failure
 
 
-User=malbot
-Group=malbot
+User=mab
+Group=mab
 
 
 StandardOutput=syslog
 StandardOutput=syslog
 StandardError=syslog
 StandardError=syslog
-SyslogIdentifier=malbot
+SyslogIdentifier=mab
 
 
 [Install]
 [Install]
 WantedBy=multi-user.target
 WantedBy=multi-user.target

+ 2 - 2
myanimebot/globals.py

@@ -18,7 +18,7 @@ HOME_DIR = os.path.expanduser("~")
 DEFAULT_CONFIG_PATHS = [
 DEFAULT_CONFIG_PATHS = [
 	os.path.join("myanimebot.conf"),
 	os.path.join("myanimebot.conf"),
 	os.path.join(BASE_DIR, "myanimebot.conf"),
 	os.path.join(BASE_DIR, "myanimebot.conf"),
-	os.path.join("/etc/malbot/myanimebot.conf"),
+	os.path.join("/etc/myanimebot/myanimebot.conf"),
 	os.path.join(HOME_DIR, "myanimebot.conf")
 	os.path.join(HOME_DIR, "myanimebot.conf")
 ]
 ]
 
 
@@ -53,7 +53,7 @@ logPath=CONFIG.get("logPath", "myanimebot.log")
 timezone=pytz.timezone(CONFIG.get("timezone", "utc"))
 timezone=pytz.timezone(CONFIG.get("timezone", "utc"))
 secondMax=CONFIG.getint("secondMax", 7200)
 secondMax=CONFIG.getint("secondMax", 7200)
 token=CONFIG.get("token")
 token=CONFIG.get("token")
-prefix=CONFIG.get("prefix", "!malbot")
+prefix=CONFIG.get("prefix", "!mab")
 delayMAL=CONFIG.get("delayMAL", "2")
 delayMAL=CONFIG.get("delayMAL", "2")
 iconBot=CONFIG.get("iconBot", "http://myanimebot.pentou.eu/rsc/bot_avatar.jpg")
 iconBot=CONFIG.get("iconBot", "http://myanimebot.pentou.eu/rsc/bot_avatar.jpg")
 ANILIST_SECONDS_BETWEEN_FETCHES=CONFIG.getint("anilist_seconds_between_fetches", 60)
 ANILIST_SECONDS_BETWEEN_FETCHES=CONFIG.getint("anilist_seconds_between_fetches", 60)