Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2c440d58c2 | |||
| 043fc9d1af | |||
| f36f221213 | |||
| 5e8a6fdb11 | |||
| 2845790459 |
@@ -1,14 +0,0 @@
|
||||
[Unit]
|
||||
Description=Cloudron Syslog
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/node index.js
|
||||
WorkingDirectory=/usr/local/cloudron-syslog
|
||||
Environment="NODE_ENV=production"
|
||||
Restart=always
|
||||
User=yellowtent
|
||||
Group=yellowtent
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -8,14 +8,17 @@ var dgram = require('dgram'),
|
||||
mkdirp = require('mkdirp'),
|
||||
parser = require('nsyslog-parser');
|
||||
|
||||
const LOG_FILE_FOLDER = '/home/yellowtent/platformdata/logs';
|
||||
const LOG_FILE_NAME = 'app.log';
|
||||
const PORT = 2514; // syslog is 514 so we prefix with 2
|
||||
const argv = require('yargs')
|
||||
.default('port', 2514, 'The port to listen on') // syslog is 514 so we prefix with 2
|
||||
.default('logdir', '/tmp/logs', 'The root log directory')
|
||||
.argv;
|
||||
|
||||
const argv = require('yargs').argv;
|
||||
const LOG_FILE_FOLDER = argv.logdir;
|
||||
const LOG_FILE_NAME = 'app.log';
|
||||
const PORT = argv.port;
|
||||
|
||||
if (argv.version) {
|
||||
console.log('1.0.0');
|
||||
console.log('1.0.1');
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
|
||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cloudron-syslog",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
+2
-3
@@ -1,11 +1,10 @@
|
||||
{
|
||||
"name": "cloudron-syslog",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "Cloudron Syslog Daemon listening on port 2514",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"postinstall": "cp cloudron-syslog.service /etc/systemd/system/ || true"
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"bin": {
|
||||
"cloudron-syslog": "./index.js"
|
||||
|
||||
Reference in New Issue
Block a user