Changeset 4851:d46b432ae11a in roaraudio for roard
- Timestamp:
- 04/09/11 22:08:18 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/include/roard.h
r4811 r4851 194 194 size_t jumbo_mtu; 195 195 int memlock_level; 196 #ifdef ROAR_HAVE_SYSTEM 197 struct { 198 const char * post_shutdown; 199 } scripts; 200 #endif 196 201 } * g_config; 197 202 -
roard/roard.c
r4848 r4851 189 189 " --log-syslog - Log Warnings, Errors, ... to syslog\n" 190 190 #endif 191 #ifdef ROAR_HAVE_SYSTEM 192 " --script-postdown S - Run command lion S after complet shutdown.\n" 193 #endif 191 194 ); 192 195 … … 476 479 477 480 g_config->memlock_level = -1; 481 482 #ifdef ROAR_HAVE_SYSTEM 483 g_config->scripts.post_shutdown = NULL; 484 #endif 478 485 479 486 return 0; … … 2042 2049 ROAR_ERR("--log-syslog not supported"); 2043 2050 #endif 2051 } else if ( strcmp(k, "--script-postdown") == 0 ) { 2052 _CKHAVEARGS(1); 2053 #ifdef ROAR_HAVE_SYSTEM 2054 g_config->scripts.post_shutdown = argv[++i]; 2055 #else 2056 ROAR_ERR("--script-postdown not supported"); 2057 i++; 2058 #endif 2044 2059 2045 2060 … … 2921 2936 roar_notify_core_free(NULL); 2922 2937 2938 ROAR_INFO("Shuting down complete", ROAR_DBG_INFO_INFO); 2939 2940 if ( g_config->scripts.post_shutdown != NULL ) 2941 system(g_config->scripts.post_shutdown); 2942 2923 2943 ROAR_INFO("Exiting, no error", ROAR_DBG_INFO_INFO); 2924 2944 return 0; … … 3008 3028 roar_notify_core_free(NULL); 3009 3029 3030 ROAR_INFO("Shuting down complete", ROAR_DBG_INFO_INFO); 3031 3032 if ( g_config->scripts.post_shutdown != NULL ) 3033 system(g_config->scripts.post_shutdown); 3034 3010 3035 ROAR_INFO("Exiting, no error", ROAR_DBG_INFO_INFO); 3011 3036 exit(0);
Note: See TracChangeset
for help on using the changeset viewer.