Commit df6cab6f authored by Éloïs's avatar Éloïs
Browse files

Merge branch 'StartUp' into '1.6'

Add startup scripts

See merge request !1224
parents 02fe3188 16e94037
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -16,8 +16,8 @@ export const WS2PDependency = {
    cliOptions: [
      { value: '--ws2p-upnp',                  desc: 'Use UPnP to open remote port.' },
      { value: '--ws2p-noupnp',                desc: 'Do not use UPnP to open remote port.' },
      { value: '--ws2p-host <host>',           desc: 'Port to listen to.' },
      { value: '--ws2p-port <port>',           desc: 'Host to listen to.', parser: (val:string) => parseInt(val) },
      { value: '--ws2p-host <host>',           desc: 'Host to listen to.' },
      { value: '--ws2p-port <port>',           desc: 'Port to listen to.', parser: (val:string) => parseInt(val) },
      { value: '--ws2p-remote-host <address>', desc: 'Availabily host.' },
      { value: '--ws2p-remote-port <port>',    desc: 'Availabily port.', parser: (val:string) => parseInt(val) },
      { value: '--ws2p-remote-path <path>',    desc: 'Availabily web path.' },
+1 −0
Original line number Diff line number Diff line
@@ -500,6 +500,7 @@ function commandLineConf(program:any, conf:any = {}) {
  if (cli.currency)                             conf.currency = cli.currency;
  if (cli.server.port)                          conf.port = cli.server.port;
  if (cli.cpu)                                  conf.cpu = Math.max(0.01, Math.min(1.0, cli.cpu));
  if (cli.nbCores)                              conf.nbCores = Math.max(1, Math.min(ProverConstants.CORES_MAXIMUM_USE_IN_PARALLEL, cli.nbCores));
  if (cli.prefix)                               conf.prefix = Math.max(ProverConstants.MIN_PEER_ID, Math.min(ProverConstants.MAX_PEER_ID, cli.prefix));
  if (cli.logs.http)                            conf.httplogs = true;
  if (cli.logs.nohttp)                          conf.httplogs = false;
+14 −3
Original line number Diff line number Diff line
@@ -167,6 +167,19 @@ tar czf "${BIN}/duniter-desktop-${DUNITER_TAG}-linux-x64.tar.gz" * || exit 1
# Build Debian packages
# -----------------------

# Parameters
# 1: Building directory.
build_extra_desktop() {
	cp -r "${ROOT}/release/extra/desktop/"* "${1}" || exit 1
}

# Parameters
# 1: Building directory.
build_extra_server() {
	mkdir -p "${1}/lib/systemd/system" || exit 1
	cp "${ROOT}/release/extra/systemd/duniter.service" "${1}/lib/systemd/system" || exit 1
}

# Parameters
# 1: either "server" or "desktop".
# 2: package name for Debian.
@@ -174,9 +187,7 @@ build_deb_pack() {
	rm -rf "${RELEASES}/duniter-x64"
	mkdir "${RELEASES}/duniter-x64" || exit 1
	cp -r "${ROOT}/release/extra/debian/package/"* "${RELEASES}/duniter-x64" || exit 1
	if [[ "${1}" == "desktop" ]]; then
		cp -r "${ROOT}/release/extra/desktop/"* "${RELEASES}/duniter-x64" || exit 1
	fi
	build_extra_${1} "${RELEASES}/duniter-x64"
	mkdir -p "${RELEASES}/duniter-x64/opt/duniter/" || exit 1
	chmod 755 "${RELEASES}/duniter-x64/DEBIAN/"post* || exit 1
	chmod 755 "${RELEASES}/duniter-x64/DEBIAN/"pre* || exit 1
+4 −0
Original line number Diff line number Diff line
@@ -34,6 +34,10 @@ if [[ -d $DUN_SOURCES/node ]]; then
  cd $DUN_SOURCES
  cd node/bin/
  ln -s ../lib/node_modules/npm/bin/npm-cli.js ./npm -f
  # Add duniter user for service
  mkdir -p /var/lib/duniter
  adduser --system --quiet --home /var/lib/duniter --no-create-home --disabled-password --group duniter
  chown duniter:duniter /var/lib/duniter
fi
# Else will execute with environment node

+19 −0
Original line number Diff line number Diff line
# File containing crypto keys
#DUNITER_KEYS=/etc/duniter/keys.yml

# Uncomment the following line to start the web GUI
#DUNITER_WEB=yes

# Parameters for the web GUI
#DUNITER_WEB_HOST=localhost
#DUNITER_WEB_PORT=9220

# User and group of running process
#DUNITER_GROUP=duniter
#DUNITER_USER=duniter

# Directory of duniter files
#DUNITER_HOME=/var/lib/duniter

# Directory of duniter data
#DUNITER_DATA=duniter_default
Loading