SM0 She11
Path:
/
/
usr
/
sbin
Full Path (server): /usr/sbin
Create Fil3
Upl04d Fil3
📄 accessdb
[E]
[D]
[R]
📄 addgnupghome
[E]
[D]
[R]
📄 addpart
[E]
[D]
[R]
📄 adduser
[E]
[D]
[R]
📄 agetty
[E]
[D]
[R]
📄 alternatives
[E]
[D]
[R]
📄 amavisd
[E]
[D]
[R]
📄 anacron
[E]
[D]
[R]
📄 applygnupgdefaults
[E]
[D]
[R]
📄 arp
[E]
[D]
[R]
📄 arpd
[E]
[D]
[R]
📄 arping
[E]
[D]
[R]
📄 atd
[E]
[D]
[R]
📄 atrun
[E]
[D]
[R]
📄 audispd
[E]
[D]
[R]
📄 auditctl
[E]
[D]
[R]
📄 auditd
[E]
[D]
[R]
📄 augenrules
[E]
[D]
[R]
📄 aureport
[E]
[D]
[R]
📄 ausearch
[E]
[D]
[R]
📄 authconfig
[E]
[D]
[R]
📄 authconfig-tui
[E]
[D]
[R]
📄 autrace
[E]
[D]
[R]
📄 avcstat
[E]
[D]
[R]
📄 badblocks
[E]
[D]
[R]
📄 biosdecode
[E]
[D]
[R]
📄 blkdeactivate
[E]
[D]
[R]
📄 blkdiscard
[E]
[D]
[R]
📄 blkid
[E]
[D]
[R]
📄 blockdev
[E]
[D]
[R]
📄 bridge
[E]
[D]
[R]
📄 btrfs
[E]
[D]
[R]
📄 btrfs-convert
[E]
[D]
[R]
📄 btrfs-debug-tree
[E]
[D]
[R]
📄 btrfs-find-root
[E]
[D]
[R]
📄 btrfs-image
[E]
[D]
[R]
📄 btrfs-map-logical
[E]
[D]
[R]
📄 btrfs-select-super
[E]
[D]
[R]
📄 btrfs-zero-log
[E]
[D]
[R]
📄 btrfsck
[E]
[D]
[R]
📄 btrfstune
[E]
[D]
[R]
📄 build-locale-archive
[E]
[D]
[R]
📄 cacertdir_rehash
[E]
[D]
[R]
📄 capsh
[E]
[D]
[R]
📄 cbq
[E]
[D]
[R]
📄 cfdisk
[E]
[D]
[R]
📄 chcpu
[E]
[D]
[R]
📄 chgpasswd
[E]
[D]
[R]
📄 chkconfig
[E]
[D]
[R]
📄 chpasswd
[E]
[D]
[R]
📄 chronyd
[E]
[D]
[R]
📄 chroot
[E]
[D]
[R]
📄 clamd
[E]
[D]
[R]
📄 clamonacc
[E]
[D]
[R]
📄 clock
[E]
[D]
[R]
📄 clockdiff
[E]
[D]
[R]
📄 consoletype
[E]
[D]
[R]
📄 convertquota
[E]
[D]
[R]
📄 cracklib-check
[E]
[D]
[R]
📄 cracklib-format
[E]
[D]
[R]
📄 cracklib-packer
[E]
[D]
[R]
📄 cracklib-unpacker
[E]
[D]
[R]
📄 create-cracklib-dict
[E]
[D]
[R]
📄 crond
[E]
[D]
[R]
📄 csf
[E]
[D]
[R]
📄 ctrlaltdel
[E]
[D]
[R]
📄 ctstat
[E]
[D]
[R]
📄 ddns-confgen
[E]
[D]
[R]
📄 debugfs
[E]
[D]
[R]
📄 delpart
[E]
[D]
[R]
📄 depmod
[E]
[D]
[R]
📄 devlink
[E]
[D]
[R]
📄 dhclient
[E]
[D]
[R]
📄 dhclient-script
[E]
[D]
[R]
📄 dmfilemapd
[E]
[D]
[R]
📄 dmidecode
[E]
[D]
[R]
📄 dmsetup
[E]
[D]
[R]
📄 dmstats
[E]
[D]
[R]
📄 dnssec-checkds
[E]
[D]
[R]
📄 dnssec-coverage
[E]
[D]
[R]
📄 dnssec-dsfromkey
[E]
[D]
[R]
📄 dnssec-importkey
[E]
[D]
[R]
📄 dnssec-keyfromlabel
[E]
[D]
[R]
📄 dnssec-keygen
[E]
[D]
[R]
📄 dnssec-keymgr
[E]
[D]
[R]
📄 dnssec-revoke
[E]
[D]
[R]
📄 dnssec-settime
[E]
[D]
[R]
📄 dnssec-signzone
[E]
[D]
[R]
📄 dnssec-verify
[E]
[D]
[R]
📄 dovecot
[E]
[D]
[R]
📄 dracut
[E]
[D]
[R]
📄 dumpe2fs
[E]
[D]
[R]
📄 e2freefrag
[E]
[D]
[R]
📄 e2fsck
[E]
[D]
[R]
📄 e2image
[E]
[D]
[R]
📄 e2label
[E]
[D]
[R]
📄 e2undo
[E]
[D]
[R]
📄 e4defrag
[E]
[D]
[R]
📄 eapol_test
[E]
[D]
[R]
📄 edquota
[E]
[D]
[R]
📄 ether-wake
[E]
[D]
[R]
📄 ethtool
[E]
[D]
[R]
📄 faillock
[E]
[D]
[R]
📄 fdformat
[E]
[D]
[R]
📄 fdisk
[E]
[D]
[R]
📄 filefrag
[E]
[D]
[R]
📄 findfs
[E]
[D]
[R]
📄 fixfiles
[E]
[D]
[R]
📄 fsck
[E]
[D]
[R]
📄 fsck.btrfs
[E]
[D]
[R]
📄 fsck.cramfs
[E]
[D]
[R]
📄 fsck.ext2
[E]
[D]
[R]
📄 fsck.ext3
[E]
[D]
[R]
📄 fsck.ext4
[E]
[D]
[R]
📄 fsck.minix
[E]
[D]
[R]
📄 fsck.xfs
[E]
[D]
[R]
📄 fsfreeze
[E]
[D]
[R]
📄 fstrim
[E]
[D]
[R]
📄 fuser
[E]
[D]
[R]
📄 genccode
[E]
[D]
[R]
📄 gencmn
[E]
[D]
[R]
📄 genhomedircon
[E]
[D]
[R]
📄 genhostid
[E]
[D]
[R]
📄 genl
[E]
[D]
[R]
📄 genl-ctrl-list
[E]
[D]
[R]
📄 gennorm2
[E]
[D]
[R]
📄 genrandom
[E]
[D]
[R]
📄 gensprep
[E]
[D]
[R]
📄 getcap
[E]
[D]
[R]
📄 getenforce
[E]
[D]
[R]
📄 getpcaps
[E]
[D]
[R]
📄 getsebool
[E]
[D]
[R]
📄 glibc_post_upgrade.x86_64
[E]
[D]
[R]
📄 groupadd
[E]
[D]
[R]
📄 groupdel
[E]
[D]
[R]
📄 groupmems
[E]
[D]
[R]
📄 groupmod
[E]
[D]
[R]
📄 grpck
[E]
[D]
[R]
📄 grpconv
[E]
[D]
[R]
📄 grpunconv
[E]
[D]
[R]
📄 grub2-bios-setup
[E]
[D]
[R]
📄 grub2-get-kernel-settings
[E]
[D]
[R]
📄 grub2-install
[E]
[D]
[R]
📄 grub2-macbless
[E]
[D]
[R]
📄 grub2-mkconfig
[E]
[D]
[R]
📄 grub2-ofpathname
[E]
[D]
[R]
📄 grub2-probe
[E]
[D]
[R]
📄 grub2-reboot
[E]
[D]
[R]
📄 grub2-rpm-sort
[E]
[D]
[R]
📄 grub2-set-default
[E]
[D]
[R]
📄 grub2-setpassword
[E]
[D]
[R]
📄 grub2-sparc64-setup
[E]
[D]
[R]
📄 grubby
[E]
[D]
[R]
📄 gss-server
[E]
[D]
[R]
📄 halt
[E]
[D]
[R]
📄 hardlink
[E]
[D]
[R]
📄 hwclock
[E]
[D]
[R]
📄 iconvconfig
[E]
[D]
[R]
📄 iconvconfig.x86_64
[E]
[D]
[R]
📄 icupkg
[E]
[D]
[R]
📄 ifcfg
[E]
[D]
[R]
📄 ifconfig
[E]
[D]
[R]
📄 ifdown
[E]
[D]
[R]
📄 ifenslave
[E]
[D]
[R]
📄 ifstat
[E]
[D]
[R]
📄 ifup
[E]
[D]
[R]
📄 init
[E]
[D]
[R]
📄 insmod
[E]
[D]
[R]
📄 install-info
[E]
[D]
[R]
📄 installkernel
[E]
[D]
[R]
📄 intel-microcode2ucode
[E]
[D]
[R]
📄 ip
[E]
[D]
[R]
📄 ip6tables
[E]
[D]
[R]
📄 ip6tables-restore
[E]
[D]
[R]
📄 ip6tables-save
[E]
[D]
[R]
📄 ipmaddr
[E]
[D]
[R]
📄 iptables
[E]
[D]
[R]
📄 iptables-restore
[E]
[D]
[R]
📄 iptables-save
[E]
[D]
[R]
📄 iptunnel
[E]
[D]
[R]
📄 irqbalance
[E]
[D]
[R]
📄 isc-hmac-fixup
[E]
[D]
[R]
📄 kexec
[E]
[D]
[R]
📄 killall5
[E]
[D]
[R]
📄 kpartx
[E]
[D]
[R]
📄 lchage
[E]
[D]
[R]
📄 ldattach
[E]
[D]
[R]
📄 ldconfig
[E]
[D]
[R]
📄 lfd
[E]
[D]
[R]
📄 lgroupadd
[E]
[D]
[R]
📄 lgroupdel
[E]
[D]
[R]
📄 lgroupmod
[E]
[D]
[R]
📄 lid
[E]
[D]
[R]
📄 lnewusers
[E]
[D]
[R]
📄 lnstat
[E]
[D]
[R]
📄 load_policy
[E]
[D]
[R]
📄 logrotate
[E]
[D]
[R]
📄 logsave
[E]
[D]
[R]
📄 losetup
[E]
[D]
[R]
📄 lpasswd
[E]
[D]
[R]
📄 lsmod
[E]
[D]
[R]
📄 lsof
[E]
[D]
[R]
📄 luseradd
[E]
[D]
[R]
📄 luserdel
[E]
[D]
[R]
📄 lusermod
[E]
[D]
[R]
📄 lwresd
[E]
[D]
[R]
📄 makedumpfile
[E]
[D]
[R]
📄 matchpathcon
[E]
[D]
[R]
📄 mii-diag
[E]
[D]
[R]
📄 mii-tool
[E]
[D]
[R]
📄 mkdict
[E]
[D]
[R]
📄 mkdumprd
[E]
[D]
[R]
📄 mke2fs
[E]
[D]
[R]
📄 mkfs
[E]
[D]
[R]
📄 mkfs.btrfs
[E]
[D]
[R]
📄 mkfs.cramfs
[E]
[D]
[R]
📄 mkfs.ext2
[E]
[D]
[R]
📄 mkfs.ext3
[E]
[D]
[R]
📄 mkfs.ext4
[E]
[D]
[R]
📄 mkfs.minix
[E]
[D]
[R]
📄 mkfs.xfs
[E]
[D]
[R]
📄 mkhomedir_helper
[E]
[D]
[R]
📄 mklost+found
[E]
[D]
[R]
📄 mkswap
[E]
[D]
[R]
📄 modinfo
[E]
[D]
[R]
📄 modprobe
[E]
[D]
[R]
📄 mysqld
[E]
[D]
[R]
📄 named
[E]
[D]
[R]
📄 named-checkconf
[E]
[D]
[R]
📄 named-checkzone
[E]
[D]
[R]
📄 named-compilezone
[E]
[D]
[R]
📄 named-journalprint
[E]
[D]
[R]
📄 nameif
[E]
[D]
[R]
📄 netreport
[E]
[D]
[R]
📄 new-kernel-pkg
[E]
[D]
[R]
📄 newusers
[E]
[D]
[R]
📄 nl-class-add
[E]
[D]
[R]
📄 nl-class-delete
[E]
[D]
[R]
📄 nl-class-list
[E]
[D]
[R]
📄 nl-classid-lookup
[E]
[D]
[R]
📄 nl-cls-add
[E]
[D]
[R]
📄 nl-cls-delete
[E]
[D]
[R]
📄 nl-cls-list
[E]
[D]
[R]
📄 nl-link-list
[E]
[D]
[R]
📄 nl-pktloc-lookup
[E]
[D]
[R]
📄 nl-qdisc-add
[E]
[D]
[R]
📄 nl-qdisc-delete
[E]
[D]
[R]
📄 nl-qdisc-list
[E]
[D]
[R]
📄 nologin
[E]
[D]
[R]
📄 nsec3hash
[E]
[D]
[R]
📄 nstat
[E]
[D]
[R]
📄 ownership
[E]
[D]
[R]
📄 packer
[E]
[D]
[R]
📄 pam_console_apply
[E]
[D]
[R]
📄 pam_tally2
[E]
[D]
[R]
📄 pam_timestamp_check
[E]
[D]
[R]
📄 paperconfig
[E]
[D]
[R]
📄 parted
[E]
[D]
[R]
📄 partprobe
[E]
[D]
[R]
📄 partx
[E]
[D]
[R]
📄 pflogsumm
[E]
[D]
[R]
📄 pidof
[E]
[D]
[R]
📄 ping6
[E]
[D]
[R]
📄 pivot_root
[E]
[D]
[R]
📄 plipconfig
[E]
[D]
[R]
📄 pluginviewer
[E]
[D]
[R]
📄 portrelease
[E]
[D]
[R]
📄 portreserve
[E]
[D]
[R]
📄 postalias
[E]
[D]
[R]
📄 postcat
[E]
[D]
[R]
📄 postconf
[E]
[D]
[R]
📄 postdrop
[E]
[D]
[R]
📄 postfix
[E]
[D]
[R]
📄 postkick
[E]
[D]
[R]
📄 postlock
[E]
[D]
[R]
📄 postlog
[E]
[D]
[R]
📄 postmap
[E]
[D]
[R]
📄 postmulti
[E]
[D]
[R]
📄 postqueue
[E]
[D]
[R]
📄 postsuper
[E]
[D]
[R]
📄 poweroff
[E]
[D]
[R]
📄 ppp-watch
[E]
[D]
[R]
📄 pure-authd
[E]
[D]
[R]
📄 pure-config.pl
[E]
[D]
[R]
📄 pure-config.py
[E]
[D]
[R]
📄 pure-ftpd
[E]
[D]
[R]
📄 pure-ftpwho
[E]
[D]
[R]
📄 pure-mrtginfo
[E]
[D]
[R]
📄 pure-quotacheck
[E]
[D]
[R]
📄 pure-uploadscript
[E]
[D]
[R]
📄 pwck
[E]
[D]
[R]
📄 pwconv
[E]
[D]
[R]
📄 pwhistory_helper
[E]
[D]
[R]
📄 pwunconv
[E]
[D]
[R]
📄 qshape
[E]
[D]
[R]
📄 quot
[E]
[D]
[R]
📄 quotacheck
[E]
[D]
[R]
📄 quotaoff
[E]
[D]
[R]
📄 quotaon
[E]
[D]
[R]
📄 quotastats
[E]
[D]
[R]
📄 rcmysql
[E]
[D]
[R]
📄 rdisc
[E]
[D]
[R]
📄 rdma
[E]
[D]
[R]
📄 readprofile
[E]
[D]
[R]
📄 reboot
[E]
[D]
[R]
📄 repquota
[E]
[D]
[R]
📄 resize2fs
[E]
[D]
[R]
📄 resizepart
[E]
[D]
[R]
📄 restorecon
[E]
[D]
[R]
📄 rmmod
[E]
[D]
[R]
📄 rndc
[E]
[D]
[R]
📄 rndc-confgen
[E]
[D]
[R]
📄 route
[E]
[D]
[R]
📄 routef
[E]
[D]
[R]
📄 routel
[E]
[D]
[R]
📄 rpc.rquotad
[E]
[D]
[R]
📄 rpcbind
[E]
[D]
[R]
📄 rpcinfo
[E]
[D]
[R]
📄 rsyslogd
[E]
[D]
[R]
📄 rtacct
[E]
[D]
[R]
📄 rtcwake
[E]
[D]
[R]
📄 rtmon
[E]
[D]
[R]
📄 rtpr
[E]
[D]
[R]
📄 rtstat
[E]
[D]
[R]
📄 runlevel
[E]
[D]
[R]
📄 runuser
[E]
[D]
[R]
📄 safe_finger
[E]
[D]
[R]
📄 sasl2-shared-mechlist
[E]
[D]
[R]
📄 saslauthd
[E]
[D]
[R]
📄 sasldblistusers2
[E]
[D]
[R]
📄 saslpasswd2
[E]
[D]
[R]
📄 sefcontext_compile
[E]
[D]
[R]
📄 selabel_digest
[E]
[D]
[R]
📄 selabel_lookup
[E]
[D]
[R]
📄 selabel_lookup_best_match
[E]
[D]
[R]
📄 selabel_partial_match
[E]
[D]
[R]
📄 selinux_restorecon
[E]
[D]
[R]
📄 selinuxconlist
[E]
[D]
[R]
📄 selinuxdefcon
[E]
[D]
[R]
📄 selinuxenabled
[E]
[D]
[R]
📄 selinuxexeccon
[E]
[D]
[R]
📄 semanage
[E]
[D]
[R]
📄 semodule
[E]
[D]
[R]
📄 sendmail
[E]
[D]
[R]
📄 sendmail.postfix
[E]
[D]
[R]
📄 service
[E]
[D]
[R]
📄 sestatus
[E]
[D]
[R]
📄 setcap
[E]
[D]
[R]
📄 setenforce
[E]
[D]
[R]
📄 setfiles
[E]
[D]
[R]
📄 setquota
[E]
[D]
[R]
📄 setsebool
[E]
[D]
[R]
📄 sfdisk
[E]
[D]
[R]
📄 shutdown
[E]
[D]
[R]
📄 sim_server
[E]
[D]
[R]
📄 slattach
[E]
[D]
[R]
📄 sln
[E]
[D]
[R]
📄 smtp-sink
[E]
[D]
[R]
📄 smtp-source
[E]
[D]
[R]
📄 snmpd
[E]
[D]
[R]
📄 snmptrapd
[E]
[D]
[R]
📄 ss
[E]
[D]
[R]
📄 sshd
[E]
[D]
[R]
📄 sshd-keygen
[E]
[D]
[R]
📄 sulogin
[E]
[D]
[R]
📄 sushell
[E]
[D]
[R]
📄 swaplabel
[E]
[D]
[R]
📄 swapoff
[E]
[D]
[R]
📄 swapon
[E]
[D]
[R]
📄 switch_root
[E]
[D]
[R]
📄 sys-unconfig
[E]
[D]
[R]
📄 sysctl
[E]
[D]
[R]
📄 tc
[E]
[D]
[R]
📄 tcpd
[E]
[D]
[R]
📄 tcpdmatch
[E]
[D]
[R]
📄 tcsd
[E]
[D]
[R]
📄 telinit
[E]
[D]
[R]
📄 testsaslauthd
[E]
[D]
[R]
📄 tmpwatch
[E]
[D]
[R]
📄 tracepath
[E]
[D]
[R]
📄 tracepath6
[E]
[D]
[R]
📄 try-from
[E]
[D]
[R]
📄 tsig-keygen
[E]
[D]
[R]
📄 tune2fs
[E]
[D]
[R]
📄 tuned
[E]
[D]
[R]
📄 tuned-adm
[E]
[D]
[R]
📄 udevadm
[E]
[D]
[R]
📄 unix_chkpwd
[E]
[D]
[R]
📄 unix_update
[E]
[D]
[R]
📄 update-alternatives
[E]
[D]
[R]
📄 useradd
[E]
[D]
[R]
📄 userdel
[E]
[D]
[R]
📄 userhelper
[E]
[D]
[R]
📄 usermod
[E]
[D]
[R]
📄 usernetctl
[E]
[D]
[R]
📄 uuserver
[E]
[D]
[R]
📄 vigr
[E]
[D]
[R]
📄 vipw
[E]
[D]
[R]
📄 virt-what
[E]
[D]
[R]
📄 visudo
[E]
[D]
[R]
📄 vmcore-dmesg
[E]
[D]
[R]
📄 vpddecode
[E]
[D]
[R]
📄 weak-modules
[E]
[D]
[R]
📄 wipefs
[E]
[D]
[R]
📄 wpa_cli
[E]
[D]
[R]
📄 wpa_passphrase
[E]
[D]
[R]
📄 wpa_supplicant
[E]
[D]
[R]
📄 xfs_admin
[E]
[D]
[R]
📄 xfs_bmap
[E]
[D]
[R]
📄 xfs_copy
[E]
[D]
[R]
📄 xfs_db
[E]
[D]
[R]
📄 xfs_estimate
[E]
[D]
[R]
📄 xfs_freeze
[E]
[D]
[R]
📄 xfs_fsr
[E]
[D]
[R]
📄 xfs_growfs
[E]
[D]
[R]
📄 xfs_info
[E]
[D]
[R]
📄 xfs_io
[E]
[D]
[R]
📄 xfs_logprint
[E]
[D]
[R]
📄 xfs_mdrestore
[E]
[D]
[R]
📄 xfs_metadump
[E]
[D]
[R]
📄 xfs_mkfile
[E]
[D]
[R]
📄 xfs_ncheck
[E]
[D]
[R]
📄 xfs_quota
[E]
[D]
[R]
📄 xfs_repair
[E]
[D]
[R]
📄 xfs_rtcp
[E]
[D]
[R]
📄 xqmstats
[E]
[D]
[R]
📄 xtables-multi
[E]
[D]
[R]
📄 yum-complete-transaction
[E]
[D]
[R]
📄 yumdb
[E]
[D]
[R]
📄 zdump
[E]
[D]
[R]
📄 zic
[E]
[D]
[R]
📄 zramctl
[E]
[D]
[R]
Editing: rcmysql
#!/bin/sh # Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB # This file is public domain and comes with NO WARRANTY of any kind # MariaDB daemon start/stop script. # Usually this is put in /etc/init.d (at least on machines SYSV R4 based # systems) and linked to /etc/rc3.d/S99mysql and /etc/rc0.d/K01mysql. # When this is done the mysql server will be started when the machine is # started and shut down when the systems goes down. # Comments to support chkconfig on RedHat Linux # chkconfig: 2345 64 36 # description: A very fast and reliable SQL database engine. # Comments to support LSB init script conventions ### BEGIN INIT INFO # Provides: mysql # Required-Start: $local_fs $network $remote_fs # Should-Start: ypbind nscd ldap ntpd xntpd # Required-Stop: $local_fs $network $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: start and stop MariaDB # Description: MariaDB is a very fast and reliable SQL database engine. ### END INIT INFO # have to do one of the following things for this script to work: # # - Run this script from within the MariaDB installation directory # - Create a /etc/my.cnf file with the following information: # [mysqld] # basedir=<path-to-mysql-installation-directory> # - Add the above to any other configuration file (for example ~/.my.ini) # and copy my_print_defaults to /usr/bin # - Add the path to the mysql-installation-directory to the basedir variable # below. # # If you want to affect other MariaDB variables, you should make your changes # in the /etc/my.cnf, ~/.my.cnf or other MariaDB configuration files. # If you change base dir, you must also change datadir. These may get # overwritten by settings in the MariaDB configuration files. basedir= datadir= # Default value, in seconds, afterwhich the script should timeout waiting # for server start. # Value here is overridden by value in my.cnf. # 0 means don't wait at all # Negative numbers mean to wait indefinitely service_startup_timeout=900 # Lock directory for RedHat / SuSE. lockdir='/var/lock/subsys' lock_file_path="$lockdir/mysql" # The following variables are only set for letting mysql.server find things. # Set some defaults mysqld_pid_file_path= if test -z "$basedir" then basedir=/usr bindir=/usr/bin if test -z "$datadir" then datadir=/var/lib/mysql fi sbindir=/usr/sbin libexecdir=/usr/sbin else bindir="$basedir/bin" if test -z "$datadir" then datadir="$basedir/data" fi sbindir="$basedir/sbin" if test -f "$basedir/bin/mysqld" then libexecdir="$basedir/bin" else libexecdir="$basedir/libexec" fi fi # datadir_set is used to determine if datadir was set (and so should be # *not* set inside of the --basedir= handler.) datadir_set= # # Use LSB init script functions for printing messages, if possible # lsb_functions="/lib/lsb/init-functions" if test -f $lsb_functions ; then . $lsb_functions else # Include non-LSB RedHat init functions to make systemctl redirect work init_functions="/etc/init.d/functions" if test -f $init_functions; then . $init_functions fi log_success_msg() { echo " SUCCESS! $@" } log_failure_msg() { echo " ERROR! $@" } fi PATH="/sbin:/usr/sbin:/bin:/usr/bin:$basedir/bin" export PATH mode=$1 # start or stop [ $# -ge 1 ] && shift case `echo "testing\c"`,`echo -n testing` in *c*,-n*) echo_n= echo_c= ;; *c*,*) echo_n=-n echo_c= ;; *) echo_n= echo_c='\c' ;; esac parse_server_arguments() { for arg do val=`echo "$arg" | sed -e 's/^[^=]*=//'` case "$arg" in --basedir=*) basedir="$val" bindir="$basedir/bin" if test -z "$datadir_set"; then datadir="$basedir/data" fi sbindir="$basedir/sbin" if test -f "$basedir/bin/mysqld" then libexecdir="$basedir/bin" else libexecdir="$basedir/libexec" fi libexecdir="$basedir/libexec" ;; --datadir=*) datadir="$val" datadir_set=1 ;; --log-basename=*|--hostname=*|--loose-log-basename=*) mysqld_pid_file_path="$val.pid" ;; --pid-file=*) mysqld_pid_file_path="$val" ;; --service-startup-timeout=*) service_startup_timeout="$val" ;; --user=*) user="$val"; ;; esac done } # Get arguments from the my.cnf file, # the only group, which is read from now on is [mysqld] if test -x "$bindir/my_print_defaults"; then print_defaults="$bindir/my_print_defaults" else # Try to find basedir in /etc/my.cnf conf=/etc/my.cnf print_defaults= if test -r $conf then subpat='^[^=]*basedir[^=]*=\(.*\)$' dirs=`sed -e "/$subpat/!d" -e 's//\1/' $conf` for d in $dirs do d=`echo $d | sed -e 's/[ ]//g'` if test -x "$d/bin/my_print_defaults" then print_defaults="$d/bin/my_print_defaults" break fi done fi # Hope it's in the PATH ... but I doubt it test -z "$print_defaults" && print_defaults="my_print_defaults" fi user='mysql' su_kill() { if test "$USER" = "$user"; then kill $* >/dev/null 2>&1 else su - $user -s /bin/sh -c "kill $*" >/dev/null 2>&1 fi } # # Read defaults file from 'basedir'. If there is no defaults file there # check if it's in the old (depricated) place (datadir) and read it from there # extra_args="" if test -r "$basedir/my.cnf" then extra_args="-e $basedir/my.cnf" else if test -r "$datadir/my.cnf" then extra_args="-e $datadir/my.cnf" fi fi parse_server_arguments `$print_defaults $extra_args --mysqld mysql.server` parse_server_arguments "$@" # wait for the pid file to disappear wait_for_gone () { pid="$1" # process ID of the program operating on the pid-file pid_file_path="$2" # path to the PID file. i=0 crash_protection="by checking again" while test $i -ne $service_startup_timeout ; do if su_kill -0 "$pid" ; then : # the server still runs else if test ! -s "$pid_file_path"; then # no server process and no pid-file? great, we're done! log_success_msg return 0 fi # pid-file exists, the server process doesn't. # it must've crashed, and mysqld_safe will restart it if test -n "$crash_protection"; then crash_protection="" sleep 5 continue # Check again. fi # Cannot help it log_failure_msg "The server quit without updating PID file ($pid_file_path)." return 1 # not waiting any more. fi echo $echo_n ".$echo_c" i=`expr $i + 1` sleep 1 done log_failure_msg return 1 } wait_for_ready () { i=0 while test $i -ne $service_startup_timeout ; do if $bindir/mysqladmin ping >/dev/null 2>&1; then log_success_msg return 0 elif kill -0 $! ; then : # mysqld_safe is still running else # mysqld_safe is no longer running, abort the wait loop break fi echo $echo_n ".$echo_c" i=`expr $i + 1` sleep 1 done log_failure_msg return 1 } # # Set pid file if not given # if test -z "$mysqld_pid_file_path" then mysqld_pid_file_path=$datadir/`hostname`.pid else case "$mysqld_pid_file_path" in /* ) ;; * ) mysqld_pid_file_path="$datadir/$mysqld_pid_file_path" ;; esac fi # source other config files [ -f /etc/default/mysql ] && . /etc/default/mysql [ -f /etc/sysconfig/mysql ] && . /etc/sysconfig/mysql [ -f /etc/conf.d/mysql ] && . /etc/conf.d/mysql case "$mode" in 'start') # Start daemon # Safeguard (relative paths, core dumps..) cd $basedir echo $echo_n "Starting MariaDB" if test -x $bindir/mysqld_safe then # Give extra arguments to mysqld with the my.cnf file. This script # may be overwritten at next upgrade. $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" "$@" & wait_for_ready; return_value=$? # Make lock for RedHat / SuSE if test -w "$lockdir" then touch "$lock_file_path" fi exit $return_value else log_failure_msg "Couldn't find MariaDB server ($bindir/mysqld_safe)" fi ;; 'stop') # Stop daemon. We use a signal here to avoid having to know the # root password. if test -s "$mysqld_pid_file_path" then mysqld_pid=`cat "$mysqld_pid_file_path"` if su_kill -0 $mysqld_pid ; then echo $echo_n "Shutting down MariaDB" su_kill $mysqld_pid # mysqld should remove the pid file when it exits, so wait for it. wait_for_gone $mysqld_pid "$mysqld_pid_file_path"; return_value=$? else log_failure_msg "MariaDB server process #$mysqld_pid is not running!" rm "$mysqld_pid_file_path" fi # Delete lock for RedHat / SuSE if test -f "$lock_file_path" then rm -f "$lock_file_path" fi exit $return_value else log_failure_msg "MariaDB server PID file could not be found!" fi ;; 'restart') # Stop the service and regardless of whether it was # running or not, start it again. if $0 stop "$@"; then if ! $0 start "$@"; then log_failure_msg "Failed to restart server." exit 1 fi else log_failure_msg "Failed to stop running server, so refusing to try to start." exit 1 fi ;; 'reload'|'force-reload') if test -s "$mysqld_pid_file_path" ; then read mysqld_pid < "$mysqld_pid_file_path" su_kill -HUP $mysqld_pid && log_success_msg "Reloading service MariaDB" touch "$mysqld_pid_file_path" else log_failure_msg "MariaDB PID file could not be found!" exit 1 fi ;; 'status') # First, check to see if pid file exists if test -s "$mysqld_pid_file_path" ; then read mysqld_pid < "$mysqld_pid_file_path" if su_kill -0 $mysqld_pid ; then log_success_msg "MariaDB running ($mysqld_pid)" exit 0 else log_failure_msg "MariaDB is not running, but PID file exists" exit 1 fi else # Try to find appropriate mysqld process mysqld_pid=`pgrep -f $libexecdir/mysqld` # test if multiple pids exist pid_count=`echo $mysqld_pid | wc -w` if test $pid_count -gt 1 ; then log_failure_msg "Multiple MariaDB running but PID file could not be found ($mysqld_pid)" exit 5 elif test -z $mysqld_pid ; then if test -f "$lock_file_path" ; then log_failure_msg "MariaDB is not running, but lock file ($lock_file_path) exists" exit 2 fi log_failure_msg "MariaDB is not running" exit 3 else log_failure_msg "MariaDB is running but PID file could not be found" exit 4 fi fi ;; 'configtest') # Safeguard (relative paths, core dumps..) cd $basedir echo $echo_n "Testing MariaDB configuration syntax" daemon=$bindir/mysqld if test -x $libexecdir/mysqld then daemon=$libexecdir/mysqld elif test -x $sbindir/mysqld then daemon=$sbindir/mysqld elif test -x `which mysqld` then daemon=`which mysqld` else log_failure_msg "Unable to locate the mysqld binary!" exit 1 fi help_out=`$daemon --help 2>&1`; r=$? if test "$r" != 0 ; then log_failure_msg "$help_out" log_failure_msg "There are syntax errors in the server configuration. Please fix them!" else log_success_msg "Syntax OK" fi exit $r ;; 'bootstrap') if test "$_use_systemctl" == 1 ; then log_failure_msg "Please use galera_new_cluster to start the mariadb service with --wsrep-new-cluster" exit 1 fi # Bootstrap the cluster, start the first node # that initiate the cluster echo $echo_n "Bootstrapping the cluster.. " $0 start $other_args --wsrep-new-cluster exit $? ;; *) # usage basename=`basename "$0"` echo "Usage: $basename {start|stop|restart|reload|force-reload|status|configtest|bootstrap} [ MariaDB server options ]" exit 1 ;; esac exit 0
Save