blob: b21e4df744d68d06572d5a1a5ab38a486f9cf7d9 [file] [log] [blame]
hj.shaofe9d0022025-06-11 20:22:48 -07001#include "gsw_sys_interface.h"
2
3int gsw_sys_svr_ftp_start(const char *cfg)
4{
5 int ret = GSW_HAL_SUCCESS;
6 (void)cfg;
7 ret = system("/etc/init.d/vsftpd start");
8 if(ret != 0)
9 return GSW_HAL_NORMAL_FAIL;
10
11 return GSW_HAL_SUCCESS;
12}
13
14int gsw_sys_svr_ftp_stop()
15{
16 int ret = GSW_HAL_SUCCESS;
17 ret = system("/etc/init.d/vsftpd stop");
18 return ret;
19}
20
21int gsw_sys_svr_ssh_start(const char *cfg)
22{
23 int ret= GSW_HAL_SUCCESS;
24 ret = system("/etc/init.d/sshd restart");
25 if(ret != 0)
26 return GSW_HAL_NORMAL_FAIL;
27 return GSW_HAL_SUCCESS;
28}
29
30int gsw_sys_svr_ssh_stop()
31{
32 int ret = GSW_HAL_SUCCESS;
33 ret = system("/etc/init.d/sshd stop");
34 if(ret != 0)
35 return GSW_HAL_NORMAL_FAIL;
36
37 return GSW_HAL_SUCCESS;
38}
39
40int gsw_sys_svr_syslog_restart(const char *log_lvl)
41{
42 (void)log_lvl;
43 return GSW_HAL_NORMAL_FAIL;
44}
45
46