Skip to content

Instantly share code, notes, and snippets.

View ViXP's full-sized avatar
🇺🇦

Cyril Chubenko (ViXP) ViXP

🇺🇦
  • Freelance
  • Kyiv, Ukraine
  • 20:30 (UTC +02:00)
View GitHub Profile
@ViXP
ViXP / redis_6379
Created October 11, 2017 21:04
Redis initialization script, edited for Debian 9 support (LSB tags added for proper work with update-rc.d)
#!/bin/sh
### BEGIN INIT INFO
# Provides: redis
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the redis server
# Description: starts redis using...
@ViXP
ViXP / Debian Memcached init script
Last active October 3, 2017 15:13
Debian script for starting and stopping the Memcached server (with config file in /etc/memcached.conf and executable file in /usr/local/bin/memcached)
#!/bin/sh
# /etc/init.d/memcached
PIDFILE=/var/run/memcached.pid
EXEC=/usr/local/bin/memcached
CONF=$(grep '^-.*$' /etc/memcached.conf | tr '\n' ' ')
Start() {
echo "Starting Memcached server..."
$EXEC $CONF