Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /proc/self/root/etc/rc6.d/ |
Upload File : |
#!/bin/bash # chkconfig: 2345 55 25 # description: mongodb ### BEGIN INIT INFO # Provides: mongodb # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: starts mongodb # Description: starts the mongodb ### END INIT INFO MONGO_PATH=/www/server/mongodb if [ ! -f $MONGO_PATH/bin/mongod ];then echo "No installation of mognodb." exit; fi Config=/www/server/mongodb/config.conf User=mongo start() { #chmod -R mongo:mongo /www/server/mongodb sudo -u $User mongod -f $Config } stop() { sudo -u $User mongod --shutdown -f $Config a=`ps aux|grep '/www/server/mongodb'|grep -v 'grep'|awk '{print $2}'` if [ "$a" != "" ];then kill -9 $a fi } case "$1" in 'start') start ;; 'stop') stop ;; 'restart') stop sleep 2 start ;; *) echo "Usage: /etc/init.d/mongodb {start|stop|restart}" ;; esac