Fix nextcloud-quirk systemD service failures. Also get clamAV configuration to work.
This commit is contained in:
@@ -65,8 +65,8 @@ let
|
|||||||
"
|
"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "Subject: [ADMIN] $SUBJECT\n\n$TECH_BODY" | /run/wrappers/bin/sendmail -t "$ADMIN_EMAIL"
|
printf "Subject: [ADMIN] %s\n\n%s" "$SUBJECT" "$TECH_BODY" | /run/wrappers/bin/sendmail -t "$ADMIN_EMAIL"
|
||||||
printf "Subject: [Alerte] Menace détectée sur votre serveur Numbus\n\n$FRIENDLY_BODY\n\nMerci de votre confiance,\nL'équipe de support,\nNumbus-Server." | /run/wrappers/bin/sendmail -t "$USER_EMAIL"
|
printf "Subject: [Alerte] Menace détectée sur votre serveur Numbus\n\n%s\n\nMerci de votre confiance,\nL'équipe de support,\nNumbus-Server." "$FRIENDLY_BODY" | /run/wrappers/bin/sendmail -t "$USER_EMAIL"
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.numbus.services.clamav;
|
cfg = config.numbus.services.clamav;
|
||||||
onAccessPaths = lib.mapAttrsToList (n: v: v.dataDir) (lib.filterAttrs (n: v:
|
onAccessPaths = lib.mapAttrsToList (n: v: v.dataDir) (lib.filterAttrs (n: v:
|
||||||
v ? enable && v.enable && v ? dataDir && v.dataDir != false
|
v ? enable && v.enable && v ? dataDir && v.dataDir != null && v.dataDir != false
|
||||||
) config.numbus.services);
|
) config.numbus.services);
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ in
|
|||||||
settings = {
|
settings = {
|
||||||
OnAccessPrevention = true;
|
OnAccessPrevention = true;
|
||||||
OnAccessIncludePath = onAccessPaths;
|
OnAccessIncludePath = onAccessPaths;
|
||||||
VirusEvent = "echo 'CLAM_VIRUSEVENT_VIRUSNAME=\"%v\"\nCLAM_VIRUSEVENT_FILENAME=\"%f\"' > /var/lib/clamav/virus_event.env && /run/wrappers/bin/sudo /run/current-system/sw/bin/systemctl start clamav-virus-notify.service";
|
VirusEvent = "printf 'CLAM_VIRUSEVENT_VIRUSNAME=\"%v\"\\nCLAM_VIRUSEVENT_FILENAME=\"%f\"\\n' > /var/lib/clamav/virus_event.env && /run/wrappers/bin/sudo /run/current-system/sw/bin/systemctl start clamav-virus-notify.service";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ helper.mkPodmanService {
|
|||||||
$OCC maintenance:repair --include-expensive
|
$OCC maintenance:repair --include-expensive
|
||||||
|
|
||||||
INSTALL_APPS_LIST=( "calendar" "contacts" "mail" "notes" "onlyoffice" "cookbook" "whiteboard" )
|
INSTALL_APPS_LIST=( "calendar" "contacts" "mail" "notes" "onlyoffice" "cookbook" "whiteboard" )
|
||||||
REMOVE_APPS_LIST=( "activity" "federation" "webhook_listeners" "photos" "recommendations" "sharebymail" "teams" "support" "richdocumentscode" )
|
DISABLE_APPS_LIST=( "activity" "federation" "webhook_listeners" "photos" "recommendations" "sharebymail" "teams" "support" "richdocumentscode" )
|
||||||
|
|
||||||
for app in ''${INSTALL_APPS_LIST[@]}; do
|
for app in ''${INSTALL_APPS_LIST[@]}; do
|
||||||
if ! $OCC --no-warnings app:list | grep -iq "$app:"; then
|
if ! $OCC --no-warnings app:list | grep -iq "$app:"; then
|
||||||
@@ -253,13 +253,10 @@ helper.mkPodmanService {
|
|||||||
$OCC --no-warnings app:enable "$app"
|
$OCC --no-warnings app:enable "$app"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for app in ''${REMOVE_APPS_LIST[@]}; do
|
for app in ''${DISABLE_APPS_LIST[@]}; do
|
||||||
if $OCC --no-warnings app:list --enabled | grep -iq "$app:"; then
|
if $OCC --no-warnings app:list --enabled | grep -iq "$app:"; then
|
||||||
$OCC --no-warnings app:disable "$app"
|
$OCC --no-warnings app:disable "$app"
|
||||||
fi
|
fi
|
||||||
if $OCC --no-warnings app:list | grep -iq "$app:"; then
|
|
||||||
$OCC --no-warnings app:remove "$app"
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
$OCC --no-warnings config:system:set onlyoffice DocumentServerInternalUrl --value="https://onlyoffice.${config.numbus.services.domain}/"
|
$OCC --no-warnings config:system:set onlyoffice DocumentServerInternalUrl --value="https://onlyoffice.${config.numbus.services.domain}/"
|
||||||
$OCC --no-warnings config:system:set onlyoffice DocumentServerUrl --value="https://onlyoffice.${config.numbus.services.domain}/"
|
$OCC --no-warnings config:system:set onlyoffice DocumentServerUrl --value="https://onlyoffice.${config.numbus.services.domain}/"
|
||||||
|
|||||||
Reference in New Issue
Block a user