Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clean up ubuntu/fedora inti scripts

  • Loading branch information...
commit 6a122a14452bd3af9ff48bab90b64cc04375b6b3 1 parent 2e924d5
@leamas leamas authored
View
7 fedora/README.md
@@ -64,6 +64,13 @@ separate services:
initctl <status|start|stop> diaspora-thin
initctl <status|start|stop> diaspora-websocket
initctl <status|start|stop> diaspora-magent
+ initctl <status|start|stop> diaspora-redis
+ initctl <status|start|stop> diaspora-resque
+
+All services are controlled by the SysV /etc/init.d/diaspora script. To
+start/stop all services:
+ service diaspora start
+ service diaspora stop
prepare-rpm.sh prepare creates links also for all files listed in SOURCES.
Typically, this is secondary sources listed in the spec file.
View
2  fedora/diaspora-redis.conf
@@ -1,4 +1,4 @@
-# Fedora upstart file at /etc/init/diaspora-magent.conf
+# Fedora upstart file at /etc/init/diaspora-redis.conf
stop on runlevel [06]
View
3  fedora/diaspora-setup
@@ -26,7 +26,6 @@ test -n "$services" && {
/sbin/service mongod start || :
-
libdir=$(rpm --eval %_libdir)
rm -rf vendor
@@ -41,6 +40,8 @@ test -e config/app_config.yml ||
[ -e lib/tasks/jasmine.rake ] &&
sudo mv lib/tasks/jasmine.rake lib/tasks/jasmine.no-rake
+redis_config
+
init_appconfig config/app_config.yml $arg_hostname
mongodb_config /etc/mongodb.conf
View
2  fedora/diaspora-websocket.conf
@@ -1,4 +1,4 @@
-# Fedora upstart file at /etc/init/diaspora-wsd.conf
+# Fedora upstart file at /etc/init/diaspora-websocket.conf
stop on runlevel [06]
View
30 source/funcs.sh
@@ -171,3 +171,33 @@ function mongodb_config
}
}
+function redis_config
+# Create/update the local redis.conf file from /etc master
+{
+ if [ -r "/etc/redis.conf" ]; then
+ redis_conf="/etc/redis.conf"
+ elif [ -r "/etc/redis/redis.conf" ]; then
+ redis_conf="/etc/redis/redis.conf"
+ else
+ echo <<- EOM
+ Don't know how to configure redis for this platform. Copy
+ the configuration file redis.conf to the config directory
+ and patch it manually. In particular, don't daemonize.
+ EOM
+ return
+ fi
+
+ if [ config/redis.cont -nt $redis_conf ]
+ then
+ return
+ fi
+
+ cp $redis_conf config/redis.conf
+ sed -i -e '/^[^#]*daemonize/s/yes/no/' \
+ -e '/^[^#]*logfile/s|.*|logfile /var/log/diaspora/redis.log|' \
+ config/redis.conf
+
+
+}
+
+
View
2  ubuntu/diaspora-setup
@@ -46,6 +46,8 @@ test -e config/app_config.yml ||
[ -e lib/tasks/jasmine.rake ] &&
sudo mv lib/tasks/jasmine.rake lib/tasks/jasmine.no-rake
+redis_config
+
init_appconfig config/app_config.yml $arg_hostname
init_db $arg_pw|| {
Please sign in to comment.
Something went wrong with that request. Please try again.