This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add configuration via /etc/default/polkadot
- Loading branch information
Showing
5 changed files
with
31 additions
and
20 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 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 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,17 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
action="$1" | ||
config_file="/etc/default/polkadot" | ||
|
||
if [ "$action" = "configure" ]; then | ||
# Make user and group | ||
getent group polkadot >/dev/null 2>&1 || addgroup --system polkadot | ||
getent passwd polkadot >/dev/null 2>&1 || | ||
adduser --system --home /home/polkadot --disabled-password \ | ||
--ingroup polkadot polkadot | ||
if [ ! -e "$config_file" ]; then | ||
echo 'POLKADOT_CLI_ARGS=""' > /etc/default/polkadot | ||
fi | ||
fi |
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