sartaj

joined 1 month ago
[–] sartaj@lemmy.world 2 points 1 week ago* (last edited 1 week ago) (1 children)

It is number of people necessary for instance to be functional as intended. I am trying to run an instance where only people verified using legal Documents should be able to post, comment, vote. That is to increase transparency and keep spammers away. I Intend it to be a political website I will read about GoToSocial and Pleroma

[–] sartaj@lemmy.world 1 points 1 week ago (1 children)
[–] sartaj@lemmy.world 6 points 1 week ago (5 children)

I am thinking of a VPS so that i can have greater control over instance functionality

[–] sartaj@lemmy.world 10 points 1 week ago (7 children)

suppose I kidnap 1000 people and force them to use mastodon without images, how much will it cost then? jk

54
submitted 1 week ago* (last edited 1 week ago) by sartaj@lemmy.world to c/fediverse@lemmy.world
 

how much does running a mastodon instance of 1000 users costs? Disabling Images and allowing only text is one of my condition. So if I do that, will that change cost? I am thinking of a VPS so that i can have greater control over instance functionality

How much Storage and RAM will be required roughly?

[–] sartaj@lemmy.world 2 points 2 weeks ago

it satisfies my use case

[–] sartaj@lemmy.world 1 points 2 weeks ago

I am on native android

[–] sartaj@lemmy.world 3 points 2 weeks ago

i dont want to install another app and tweak battey saver setting, auto start managent etc. termux is already set up

[–] sartaj@lemmy.world 0 points 2 weeks ago

I am on android 9

[–] sartaj@lemmy.world 2 points 2 weeks ago (2 children)

i don't know how to use DNS

[–] sartaj@lemmy.world 1 points 2 weeks ago (1 children)

i use my phone's hotspot to connect to laptop

 

I have a laptop and a phone in which termux is installed. I want to move files from my phone to my computer using rsync if all files are older than 30 days. I think I should use find command with -exec rsync.

find . -mtime +30 -exec rsync something 

but the problem is my phone's IP address is always changing so how do I transfer file? I have to run this script in my laptop

solution

i wrote a script which move files and runs in my laptop

  1. i can't use hostname because I am on android 9 and don't want to install anything else.
  2. most of the time I am offline so using any internet service is not a good idea ( my devices are connected in themselves )

here is my script

#!/usr/bin/bash

#checking if script not already running and exit if already running
[ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -en "$0" "$0" "$@" || :

set -e

TARGET_MAC="d2:1c:3c:3d:6a:a7"
RSYNC_LOG="$HOME/log/rsync_log.txt"  # Rclone log file


function get_ip() {
  # need to edit sudoers file to run 	sudo nmap -sn 192.168.43.0/24 without password
  # Allow members of group sudo to execute any command
  # %sudo	ALL=(ALL:ALL) ALL
  # 'username' ALL=(ALL) NOPASSWD: /usr/bin/nmap -sn 192.168.43.0/24


	sudo nmap -sn 192.168.43.0/24 | grep --before-context=3 -i "$TARGET_MAC" | tail -n 3 | head -n 1 | awk '{ print $6 }' | sed 's/[()]//g'; }


# run command only if wifi is connected
if echo $(nmcli general status) | grep -q -w "connected" ; then

  # for ssh to work in a changing IP address, a configuration line has to be enabled so that it does not ask for yes/no while connecting to a changed ip address
	TARGET_IP=$(get_ip)
  ssh -p 8022  "$TARGET_IP" 'find /data/data/com.termux/files/home/storage/shared/Pictures/ -mtime +30  -type d,f -printf %P\\0' | rsync --append --update --times --atimes --mkpath --verbose --human-readable --remove-source-files --log-file="$HOME/log/synced.log" --exclude='.dtrash' --files-from=- --from0  -e "ssh -p 8022" "$TARGET_IP":/data/data/com.termux/files/home/storage/shared/Pictures/ $HOME/Pictures