mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Minor improvements
This commit is contained in:
parent
6fc2c1c889
commit
a1ba5f58b8
15
README.md
15
README.md
@ -19,10 +19,9 @@ You can check [my own Maloja page](https://maloja.krateng.ch) to see what it loo
|
||||
## Table of Contents
|
||||
* [Features](#features)
|
||||
* [How to install](#how-to-install)
|
||||
* [Environment](#environment)
|
||||
* [New Installation](#new-installation)
|
||||
* [Update](#update)
|
||||
* [LXC / VM / Bare Metal](#lxc--vm--bare-metal)
|
||||
* [Docker](#docker)
|
||||
* [Extras](#extras)
|
||||
* [How to use](#how-to-use)
|
||||
* [Basic control](#basic-control)
|
||||
* [Data](#data)
|
||||
@ -124,16 +123,26 @@ An example of a minimum run configuration when accessing maloja from an IPv4 add
|
||||
|
||||
Start and stop the server with
|
||||
|
||||
```console
|
||||
maloja start
|
||||
maloja stop
|
||||
maloja restart
|
||||
```
|
||||
|
||||
If something is not working, you can try
|
||||
|
||||
```console
|
||||
maloja debug
|
||||
```
|
||||
|
||||
to run the server in the foreground.
|
||||
|
||||
```console
|
||||
maloja info
|
||||
```
|
||||
|
||||
will give you some basic information about your install.
|
||||
|
||||
|
||||
### Data
|
||||
|
||||
|
@ -2,6 +2,8 @@ import os
|
||||
from doreah.configuration import Configuration
|
||||
from doreah.configuration import types as tp
|
||||
|
||||
from .__pkginfo__ import versionstr
|
||||
|
||||
|
||||
|
||||
# if DATA_DIRECTORY is specified, this is the directory to use for EVERYTHING, no matter what
|
||||
@ -270,6 +272,13 @@ data_dir = {
|
||||
|
||||
|
||||
|
||||
### write down the last ran version
|
||||
with open(pthj(dir_settings['state'],".lastmalojaversion"),"w") as filed:
|
||||
filed.write(versionstr)
|
||||
filed.write("\n")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### DOREAH CONFIGURATION
|
||||
|
@ -95,13 +95,14 @@ def print_info():
|
||||
print_header_info()
|
||||
print("Configuration Directory:",globalconf.dir_settings['config'])
|
||||
print("Data Directory: ",globalconf.dir_settings['state'])
|
||||
print("Log Directory: ",globalconf.dir_settings['logs'])
|
||||
print("Network: ",f"IPv{ip_address(globalconf.malojaconfig['host']).version}, Port {globalconf.malojaconfig['port']}")
|
||||
print("Timezone: ",f"UTC{globalconf.malojaconfig['timezone']:+d}")
|
||||
print()
|
||||
print("#####")
|
||||
print()
|
||||
|
||||
@mainfunction({"l":"level"},shield=True)
|
||||
@mainfunction({"l":"level","v":"version"},flags=['version'],shield=True)
|
||||
def main(*args,**kwargs):
|
||||
|
||||
actions = {
|
||||
@ -118,7 +119,10 @@ def main(*args,**kwargs):
|
||||
"info":print_info
|
||||
}
|
||||
|
||||
if len(args) > 0:
|
||||
if "version" in kwargs:
|
||||
print(info.versionstr)
|
||||
|
||||
elif len(args) > 0:
|
||||
action = args[0]
|
||||
args = args[1:]
|
||||
if action in actions: actions[action](*args,**kwargs)
|
||||
|
Loading…
Reference in New Issue
Block a user