update rc

This commit is contained in:
wt
2024-11-01 13:13:36 +07:00
parent cf0750198d
commit 95e2551110
2 changed files with 9 additions and 10 deletions
+5 -5
View File
@@ -11,12 +11,8 @@
## ## ##
## ## ##
#----- colors -------
. /usr/lib/init/colors.sh
#--------------------
#---------------- variables --------------------------
rootdir=/
rootdir=$(pwd)
repofile=$rootdir/etc/pm/repo
packagesqueryfile=$rootdir/usr/share/pm/query
reposquerydir=$rootdir/usr/share/pm/repos
@@ -24,6 +20,10 @@ cachedpkgdir=$rootdir/var/cache/pm/pkg
installedpackagesdir=$rootdir/usr/share/pm/packages
#-----------------------------------------------------
#----- colors -------
. $rootdir/usr/lib/init/colors.sh
#--------------------
#---------------- check root priveleges function ------------------------
checkroot() {
if [[ $(id -u) != 0 ]]; then
+4 -5
View File
@@ -112,8 +112,8 @@ status() {
#-------------- print help function -------------------------
help() {
echo "
** rc usage:
printf "
$BLUE**$GREEN rc usage$RESET:$BWHITE
rc add [init.d script name] - add service on boot
rc del [init.d script name] - delete service from boot
rc start [init.d script name] - start service
@@ -123,15 +123,14 @@ help() {
rc bootlist - list enabled services
rc status [init.d script name] - check service status
examples:
$BLUE**$GREEN examples$RESET:$BWHITE
rc add httpd
rc del httpd
rc start httpd
rc stop httpd
rc restart httpd
rc list
rc bootlist
"
rc bootlist\n$RESET"
}
#------------------------------------------------------------