feat: void services function and aliases

This commit is contained in:
hesam-init 2024-03-16 19:52:13 +03:30
parent 9514b6e934
commit fb427b5a6e

View file

@ -13,3 +13,26 @@ alias vrepos="xbps-query -L"
alias vhold="sudo xbps-pkgdb -m hold"
alias vunhold="sudo xbps-pkgdb -m unhold"
alias killall="pkill -f"
alias svservices="ls /etc/sv/"
alias svlist="ls -la /var/service/"
alias svreset="sudo sv restart"
alias svstatus="sudo sv status"
alias svon="sudo sv up"
alias svoff="sudo sv down"
svadd() {
if [ -z "$1" ]; then
echo "Error: Please provide the path of the service to add"
return 1
fi
sudo ln -s $1 /var/service
}
svremove() {
if [ -z "$1" ]; then
echo "Error: Please provide the name of the service to remove"
return 1
fi
sudo rm -rf "/var/service/$1"
}