Created
August 18, 2016 11:38
-
-
Save nanlabsweb/1e6cb3a118c42a6d616a3a5e2e9736f5 to your computer and use it in GitHub Desktop.
POST - Create deb package example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
APP_NAME=example-app | |
PACKAGE_NAME=${APP_NAME}_1.0-0 #Standard Debian notation <project>_<major version>.<minor version>-<package revision> | |
mkdir -p $PACKAGE_NAME/DEBIAN #Copy control, postinst, preinst scripts here | |
mkdir -p $PACKAGE_NAME/etc/$APP_NAME #Copy conf.json file here | |
mkdir -p $PACKAGE_NAME/etc/init/ #Copy ${APP_NAME}.conf upstart script here | |
mkdir -p $PACKAGE_NAME/etc/logrotate.d/ #Copy $APP_NAME logrotate script here | |
mkdir -p $PACKAGE_NAME/var/lib/$APP_NAME #Copy application src here | |
mkdir -p $PACKAGE_NAME/var/log/$APP_NAME #keep empty | |
dpkg-deb --build $PACKAGE_NAME #this command should create ${PACKAGE_NAME}.deb file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment