Toolforge with cli/termux
From Yahya's Wikisphere
(Redirected from Toolforge with cli/termux)
setup ssh key
- download and install termux
- Command
apt update
apt upgrade
- Check if you have already an ssh key:
ls ~/.ssh
- if not then install openssh using
pkg install openssh
ssh-keygen -t rsa -C "MailAddress" -f ~/.ssh/id_rsa -P "secret key phrase"
- Open public key»
cat ~/.ssh/id_rsa.pub
- copy that
- go to https://toolsadmin.wikimedia.org > SSH KEY > paste key & save
logging in into toolforge
- ssh <shell username>@login.toolforge.org
- enter pass phrase
host a webservice
become ToolName
mkdir public_html
[will create a directory called public_html]- create/move file(s)/folder(s) to this directory
nano public_html/index.php
[to create file directly to the folder]mv file_path target file path
run a bot
become ToolName
- create script like edit.php
- run>
php edit.php
automation
nano bot.sh
[to see cat bot.sh]crontab -e
[-e means edit mode]- select [5]
- generate cronjob with time limit by searching google
* * * * bash /data/project/ToolName/bot.sh
- to see:
crontab -l
- to stop automated bot:
crontab -e
& remove text manually