forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebrand and update init scripts for Namecoin.
This is basically a s/bitcoin/namecoin/g (and various other variants in capitalisation) for the init scripts in contrib/init. This fixes namecoin/namecoin-core#113.
- Loading branch information
Showing
12 changed files
with
315 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
description "Namecoin Core Daemon" | ||
|
||
start on runlevel [2345] | ||
stop on starting rc RUNLEVEL=[016] | ||
|
||
env NAMECOIND_BIN="/usr/bin/namecoind" | ||
env NAMECOIND_USER="namecoin" | ||
env NAMECOIND_GROUP="namecoin" | ||
env NAMECOIND_PIDDIR="/var/run/namecoind" | ||
# upstart can't handle variables constructed with other variables | ||
env NAMECOIND_PIDFILE="/var/run/namecoind/namecoind.pid" | ||
env NAMECOIND_CONFIGFILE="/etc/namecoin/namecoin.conf" | ||
env NAMECOIND_DATADIR="/var/lib/namecoind" | ||
|
||
expect fork | ||
|
||
respawn | ||
respawn limit 5 120 | ||
kill timeout 60 | ||
|
||
pre-start script | ||
# this will catch non-existent config files | ||
# namecoind will check and exit with this very warning, but it can do so | ||
# long after forking, leaving upstart to think everything started fine. | ||
# since this is a commonly encountered case on install, just check and | ||
# warn here. | ||
if ! grep -qs '^rpcpassword=' "$NAMECOIND_CONFIGFILE" ; then | ||
echo "ERROR: You must set a secure rpcpassword to run namecoind." | ||
echo "The setting must appear in $NAMECOIND_CONFIGFILE" | ||
echo | ||
echo "This password is security critical to securing wallets " | ||
echo "and must not be the same as the rpcuser setting." | ||
echo "You can generate a suitable random password using the following " | ||
echo "command from the shell:" | ||
echo | ||
echo "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'" | ||
echo | ||
echo "It is recommended that you also set alertnotify so you are " | ||
echo "notified of problems:" | ||
echo | ||
echo "ie: alertnotify=echo %%s | mail -s \"Namecoin Alert\"" \ | ||
"admin@foo.com" | ||
echo | ||
exit 1 | ||
fi | ||
|
||
mkdir -p "$NAMECOIND_PIDDIR" | ||
chmod 0755 "$NAMECOIND_PIDDIR" | ||
chown $NAMECOIND_USER:$NAMECOIND_GROUP "$NAMECOIND_PIDDIR" | ||
chown $NAMECOIND_USER:$NAMECOIND_GROUP "$NAMECOIND_CONFIGFILE" | ||
chmod 0660 "$NAMECOIND_CONFIGFILE" | ||
end script | ||
|
||
exec start-stop-daemon \ | ||
--start \ | ||
--pidfile "$NAMECOIND_PIDFILE" \ | ||
--chuid $NAMECOIND_USER:$NAMECOIND_GROUP \ | ||
--exec "$NAMECOIND_BIN" \ | ||
-- \ | ||
-pid="$NAMECOIND_PIDFILE" \ | ||
-conf="$NAMECOIND_CONFIGFILE" \ | ||
-datadir="$NAMECOIND_DATADIR" \ | ||
-disablewallet \ | ||
-daemon | ||
|
Oops, something went wrong.