Swap File
- To create a 2GB swap file we can use "dd" command like this:
# dd if=/dev/zero of=/mnt/swapfile bs=1024 count=2097152
bs=1024
means read and write up to 1024 bytes at a time and count
it's the size of the file (1024 x 2048)MB
- Then set the appropriate permissions on the file; make it readable only by root user:
# chmod 600 /mnt/swapfile
- Now prepare the file for swap with the
mkswap
command:
# mkswap /mnt/swapfile
- Next, enable the swap file
# swapon /mnt/swapfile
- Afterwards, enable the swap file to be mounted at boot. Edit the /etc/fstab file and add the following new line in it:
/mnt/swapfile swap swap defaults 0 0
You can also disable the swapfile at runtime, any time you want; just make sure it doesn't exceed your available RAM:
# swapoff /mnt/swapfile
Last but not least, this is how to check your swap usage by process:
$ for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less
Different apps manually registered in "mod_register_apps.lua" ranging from web apps like Movim, to F-Droid apps like monocles chat and Cheogram.
See also F-Droid app code example
Here's how you add an F-Droid XMPP App to "mod_register_apps.lua" so that it shows up in the Invite registration page of prosody:
{
name = "monocles chat";
text = [[monocles chat is a fork of blabber.im and Conversations with some changes, to improve usability.]];
image = "assets/logos/monocles.png";
link = "https://f-droid.org/packages/de.monocles.chat/";
platforms = { "Android" };
supports_preauth_uri = true;
download = {
buttons = {
{
image = "https://woodpeckersnest.space/images/fdroid.png";
url = "https://f-droid.org/packages/de.monocles.chat/";
};
};
};
};
Add the "monocles.png" logo to your "assets/logos/" directory and change the "fdroid.png" image link accordingly.
Do we need it? Nope.
Do I like it? YEP!
Will be posting about my (mis)adventures while administering a VPS.. Or more than one?
For the time being I've just installed this beauty, called "chyrp-lite"