mirror of
https://git.sr.ht/~magic_rb/cluster
synced 2024-11-26 01:56:13 +01:00
wip
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
f6e66fecc3
commit
4d959c1f09
|
@ -21,12 +21,17 @@ nglib.makeSystem {
|
||||||
''
|
''
|
||||||
DATA_DIR="/var/lib/mautrix-facebook"
|
DATA_DIR="/var/lib/mautrix-facebook"
|
||||||
CONFIG_FILE="$DATA_DIR/config.yaml"
|
CONFIG_FILE="$DATA_DIR/config.yaml"
|
||||||
|
REGISTRATION_FILE="$DATA_DIR/registration.yaml"
|
||||||
DB_FILE="$DATA_DIR/sqlite.db"
|
DB_FILE="$DATA_DIR/sqlite.db"
|
||||||
|
|
||||||
cp ${config} "$CONFIG_FILE" ; chmod 755 "$CONFIG_FILE"
|
cp ${config} "$CONFIG_FILE" ; chmod 755 "$CONFIG_FILE"
|
||||||
${pkgs.sqlite}/bin/sqlite3 $DB_FILE '.databases ; .quit'
|
${pkgs.sqlite}/bin/sqlite3 $DB_FILE '.databases ; .quit'
|
||||||
[ -e -r $NOMAD_ALLOC_DIR/registration.yaml ] || \
|
|
||||||
${pkgs.mautrix-facebook}/bin/mautrix-facebook -c "$CONFIG_FILE" -r $NOMAD_ALLOC_DIR/registration.yaml -g
|
[ -e "$REGISTRATION_FILE" ] || \
|
||||||
${pkgs.mautrix-facebook}/bin/mautrix-facebook -c "$CONFIG_FILE" -r $NOMAD_ALLOC_DIR/registration.yaml -n
|
${pkgs.mautrix-facebook}/bin/mautrix-facebook -c "$CONFIG_FILE" -r "$REGISTRATION_FILE" -g
|
||||||
|
cp "$REGISTRATION_FILE" $NOMAD_TASK_DIR/registration.yaml
|
||||||
|
|
||||||
|
${pkgs.mautrix-facebook}/bin/mautrix-facebook -c "$CONFIG_FILE" -r "$REGISTRATION_FILE" -n
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue