Set the nickname for the admin account

main
Bob Mottram 2023-05-23 18:21:47 +01:00
parent 46c74acc15
commit b31b2c1338
2 changed files with 13 additions and 0 deletions

View File

@ -12,6 +12,12 @@ python3 epicyon.py --addaccount nickname@domain --password [yourpassword]
You can also leave out the **--password** option and then enter it manually, which has the advantage of passwords not being logged within command history.
To set the nickname for the admin account:
``` bash
python3 epicyon.py --setadmin nickname
```
To remove an account (be careful!):
``` bash

View File

@ -134,6 +134,9 @@ def _command_options() -> None:
opt = {}
search_date = datetime.datetime.now()
parser = argparse.ArgumentParser(description='ActivityPub Server')
parser.add_argument('--setadmin', type=str,
default=None,
help='Sets the admin nickname')
parser.add_argument('--eventDate', type=str,
default=None,
help='Date for an event when sending a c2s post' +
@ -821,6 +824,10 @@ def _command_options() -> None:
print("--path option should not end with '/'")
sys.exit()
if argb.setadmin:
set_config_param(base_dir, 'admin', argb.setadmin)
sys.exit()
if argb.import_emoji:
import_filename = argb.import_emoji
print('Importing custom emoji from ' + import_filename)