UNPKG
@nex_otaku/nginx-enable-site
Version:
latest (1.0.3)
1.0.3
1.0.2
1.0.1
1.0.0
Enable and disable Nginx hosts
@nex_otaku/nginx-enable-site
/
src
/
shell.js
15 lines
(13 loc)
•
340 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const
exec =
require
(
'child-process-promise'
).
exec
;
const
shellRun
=
async
(
command
) => {
return
exec
(command) .
then
(
function
(
result
) {
return
result.
stdout
.
trim
(); }) .
catch
(
function
(
err
) {
return
err.
stderr
.
trim
(); }); };
module
.
exports
= {
run
: shellRun }