Attempt to set up systemd supervision. Returns 1 if successful. */
| 7211 | |
| 7212 | /* Attempt to set up systemd supervision. Returns 1 if successful. */ |
| 7213 | static int redisSupervisedSystemd(void) { |
| 7214 | #ifndef HAVE_LIBSYSTEMD |
| 7215 | serverLog(LL_WARNING, |
| 7216 | "systemd supervision requested or auto-detected, but Redis is compiled without libsystemd support!"); |
| 7217 | return 0; |
| 7218 | #else |
| 7219 | if (redisCommunicateSystemd("STATUS=Redis is loading...\n") <= 0) |
| 7220 | return 0; |
| 7221 | serverLog(LL_NOTICE, |
| 7222 | "Supervised by systemd. Please make sure you set appropriate values for TimeoutStartSec and TimeoutStopSec in your service unit."); |
| 7223 | return 1; |
| 7224 | #endif |
| 7225 | } |
| 7226 | |
| 7227 | int redisIsSupervised(int mode) { |
| 7228 | int ret = 0; |
no test coverage detected