Version 0.3.2 - Fix of Services
All checks were successful
Neutral/pipeline/head This commit looks good

This commit is contained in:
CICD - Pipeline 2023-11-04 15:35:46 +01:00
parent cf59827059
commit fb053d9897
2 changed files with 37 additions and 37 deletions

View File

@ -42,24 +42,24 @@ module.exports.stopService = function(service) {
return new Promise((resolve, reject) => {
const child_process = require('child_process');
if(service == "https://subsonics.raphix.fr") {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci pm2 stop 'Subsonics'")
if(service == `https://subsonics.raphix.fr`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci 'pm2 stop "Subsonics"'`)
resolve("OK")
} else if(service == "https://git.raphix.fr" ) {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl stop gitea")
} else if(service == `https://git.raphix.fr` ) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl stop gitea`)
resolve("OK")
} else if(service == "https://jenkins.raphix.fr") {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl stop jenkins ")
} else if(service == `https://jenkins.raphix.fr`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl stop jenkins `)
resolve("OK")
} else if(service == 'https://raphix.fr') {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci pm2 stop 'Website - Raphix'")
} else if(service == `https://raphix.fr`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci 'pm2 stop "Website - Raphix"'`)
resolve("OK")
} else if(service == "https://cv.raphix.fr") {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci pm2 stop 'CV - Raphael'")
} else if(service == `https://cv.raphix.fr`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci 'pm2 stop "CV - Raphael"'`)
resolve("OK")
} else if(service == "http://omega.raphix.fr:2333") {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl stop lavalink ")
} else if(service == `http://omega.raphix.fr:2333`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl stop lavalink `)
resolve("OK")
} else {
resolve(false)
@ -75,25 +75,25 @@ module.exports.startService = function(service) {
return new Promise((resolve, reject) => {
const child_process = require('child_process');
if(service == "https://subsonics.raphix.fr") {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci pm2 start /home/gitlab-ci/subsonic.config.js")
if(service == `https://subsonics.raphix.fr`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci 'pm2 start /home/gitlab-ci/subsonic.config.js'`)
resolve("OK")
} else if(service == "https://git.raphix.fr" ) {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl start gitea")
} else if(service == `https://git.raphix.fr` ) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl start gitea`)
resolve("OK")
} else if(service == "https://jenkins.raphix.fr") {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl start jenkins ")
} else if(service == `https://jenkins.raphix.fr`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl start jenkins `)
resolve("OK")
} else if(service == 'https://raphix.fr') {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci pm2 start /home/gitlab-ci/website.config.js")
} else if(service == `https://raphix.fr`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci 'pm2 start /home/gitlab-ci/website.config.js'`)
resolve("OK")
} else if(service == "https://cv.raphix.fr") {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci pm2 start /home/gitlab-ci/cv.config.js")
} else if(service == `https://cv.raphix.fr`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci 'pm2 start /home/gitlab-ci/cv.config.js'`)
resolve("OK")
} else if(service == "http://omega.raphix.fr:2333") {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl start lavalink ")
} else if(service == `http://omega.raphix.fr:2333`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl start lavalink `)
resolve("OK")
} else {
resolve(false)
@ -109,24 +109,24 @@ module.exports.restartService = function(service) {
return new Promise((resolve, reject) => {
const child_process = require('child_process');
if(service == "https://subsonics.raphix.fr") {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci pm2 restart 'Subsonics'")
if(service == `https://subsonics.raphix.fr`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci 'pm2 restart "Subsonics"'`)
resolve("OK")
} else if(service == "https://git.raphix.fr" ) {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl restart gitea")
} else if(service == `https://git.raphix.fr` ) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl restart gitea`)
resolve("OK")
} else if(service == "https://jenkins.raphix.fr") {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl restart jenkins ")
} else if(service == `https://jenkins.raphix.fr`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl restart jenkins `)
resolve("OK")
} else if(service == 'https://raphix.fr') {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci pm2 restart 'Website - Raphix'")
} else if(service == `https://raphix.fr`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci 'pm2 restart "Website - Raphix"'`)
resolve("OK")
} else if(service == "https://cv.raphix.fr") {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci pm2 restart 'CV - Raphael'")
} else if(service == `https://cv.raphix.fr`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@alpha.raphix.fr sudo -S -u gitlab-ci 'pm2 restart "CV - Raphael"'`)
resolve("OK")
} else if(service == "http://omega.raphix.fr:2333") {
let req = child_process.exec("ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl restart lavalink ")
} else if(service == `http://omega.raphix.fr:2333`) {
let req = child_process.exec(`ssh -o StrictHostKeyChecking=no raphix@omega.raphix.fr sudo -S systemctl restart lavalink `)
resolve("OK")
} else {
resolve(false)

View File

@ -1,6 +1,6 @@
{
"name": "neutral",
"version": "0.3.1",
"version": "0.3.2",
"description": "Panel d'administration de Raphix",
"main": "index.js",
"scripts": {