Debuggage du init.d et déplacement du logo vers etc/init.d/logo.js
This commit is contained in:
@@ -36,15 +36,14 @@ async function init() {
|
|||||||
i += 1
|
i += 1
|
||||||
if(isSubSet(s.after, finishedScripts) && ( !befores[s.name] || isSubSet(befores[s.name], finishedScripts) )) {
|
if(isSubSet(s.after, finishedScripts) && ( !befores[s.name] || isSubSet(befores[s.name], finishedScripts) )) {
|
||||||
//on supprime ce service
|
//on supprime ce service
|
||||||
scripts.splice(scripts.indexOf(s))
|
scripts.splice(scripts.indexOf(s), 1)
|
||||||
|
|
||||||
const result = s.init()
|
const result = s.init()
|
||||||
if(typeof result?.then === 'function') {
|
if(typeof result?.then === 'function') {
|
||||||
await result
|
await result
|
||||||
}
|
|
||||||
finishedScripts.push(s.name)
|
finishedScripts.push(s.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
//async is optional but recomended for optimisation (optimisations are yet to be implemented)
|
||||||
|
async function init() {
|
||||||
|
//code to execute
|
||||||
|
console.log(`
|
||||||
|
_______ _________ ______ _______ _______
|
||||||
|
( ____ \\|\\ /|\\__ __/( ___ \\ ( ____ )( ___ )|\\ /|
|
||||||
|
| ( \\/| ) ( | ) ( | ( ) )| ( )|| ( ) |( \\ / )
|
||||||
|
| | | (___) | | | | (__/ / | (____)|| (___) | \\ (_) /
|
||||||
|
| | | ___ | | | | __ ( | __)| ___ | ) _ (
|
||||||
|
| | | ( ) | | | | ( \\ \\ | (\\ ( | ( ) | / ( ) \\
|
||||||
|
| (____/\\| ) ( |___) (___| )___) )| ) \\ \\__| ) ( |( / \\ )
|
||||||
|
(_______/|/ \\|\\_______/|/ \\___/ |/ \\__/|/ \\||/ \\|
|
||||||
|
|
||||||
|
_______ _______
|
||||||
|
( ___ )( ____ \\
|
||||||
|
| ( ) || ( \\/
|
||||||
|
| | | || (_____
|
||||||
|
| | | |(_____ )
|
||||||
|
| | | | ) |
|
||||||
|
| (___) |/\\____) |
|
||||||
|
(_______)\\_______)
|
||||||
|
|
||||||
|
`)
|
||||||
|
}
|
||||||
|
|
||||||
|
const after = [] // list of init script to load before
|
||||||
|
const before = []
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
init,
|
||||||
|
after,
|
||||||
|
before
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user