proper TELEBIT_CONFIG vars
This commit is contained in:
parent
3e9620ee90
commit
fa29aa3faf
|
@ -11,7 +11,7 @@
|
||||||
<string>{TELEBIT_PATH}/bin/telebitd.js</string>
|
<string>{TELEBIT_PATH}/bin/telebitd.js</string>
|
||||||
<string>daemon</string>
|
<string>daemon</string>
|
||||||
<string>--config</string>
|
<string>--config</string>
|
||||||
<string>{TELEBIT_CONFIG_PATH}</string>
|
<string>{TELEBIT_CONFIGD}</string>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<key>EnvironmentVariables</key>
|
<key>EnvironmentVariables</key>
|
||||||
|
|
|
@ -24,7 +24,8 @@ var vars = {
|
||||||
, ].join(' ')
|
, ].join(' ')
|
||||||
, telebitUser: process.env.TELEBIT_USER || os.userInfo().username
|
, telebitUser: process.env.TELEBIT_USER || os.userInfo().username
|
||||||
, telebitGroup: process.env.TELEBIT_GROUP || ('darwin' === os.platform() ? 'staff' : os.userInfo().username)
|
, telebitGroup: process.env.TELEBIT_GROUP || ('darwin' === os.platform() ? 'staff' : os.userInfo().username)
|
||||||
, telebitConfig: process.env.TELEBIT_CONFIG || path.join(os.homedir(), '.config/telebit/telebitd.yml')
|
, telebitConfig: process.env.TELEBIT_CONFIG || path.join(os.homedir(), '.config/telebit/telebit.yml')
|
||||||
|
, telebitConfigd: process.env.TELEBIT_CONFIGD || path.join(os.homedir(), '.config/telebit/telebitd.yml')
|
||||||
};
|
};
|
||||||
files.forEach(function (f) {
|
files.forEach(function (f) {
|
||||||
var text = fs.readFileSync(f[0], 'utf8')
|
var text = fs.readFileSync(f[0], 'utf8')
|
||||||
|
@ -33,6 +34,7 @@ files.forEach(function (f) {
|
||||||
.replace(/{TELEBIT_GROUP}/g, vars.telebitGroup)
|
.replace(/{TELEBIT_GROUP}/g, vars.telebitGroup)
|
||||||
.replace(/{TELEBIT_RW_DIRS}/g, vars.telebitRwDirs)
|
.replace(/{TELEBIT_RW_DIRS}/g, vars.telebitRwDirs)
|
||||||
.replace(/{TELEBIT_CONFIG}/g, vars.telebitConfig)
|
.replace(/{TELEBIT_CONFIG}/g, vars.telebitConfig)
|
||||||
|
.replace(/{TELEBIT_CONFIGD}/g, vars.telebitConfigd)
|
||||||
;
|
;
|
||||||
fs.writeFileSync(f[1], text, 'utf8');
|
fs.writeFileSync(f[1], text, 'utf8');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue